Title: [8796] trunk/drivers/staging/iio/adc/max1363_core.c: Staging: iio: adc: max1363_core: fix up some sparse warnings
Revision
8796
Author
vapier
Date
2010-05-23 00:11:31 -0400 (Sun, 23 May 2010)

Log Message

Staging: iio: adc: max1363_core: fix up some sparse warnings

From: Greg Kroah-Hartman <[email protected]>

Also fix a minor coding style issue.

Modified Paths

Diff

Modified: trunk/drivers/staging/iio/adc/max1363_core.c (8795 => 8796)


--- trunk/drivers/staging/iio/adc/max1363_core.c	2010-05-23 04:11:08 UTC (rev 8795)
+++ trunk/drivers/staging/iio/adc/max1363_core.c	2010-05-23 04:11:31 UTC (rev 8796)
@@ -139,16 +139,15 @@
 };
 
 const struct max1363_mode
-*max1363_match_mode(u32 mask, const struct max1363_chip_info *ci) {
+*max1363_match_mode(u32 mask, const struct max1363_chip_info *ci)
+{
 	int i;
 	if (mask)
 		for (i = 0; i < ci->num_modes; i++)
-			if (!((~max1363_mode_table[ci->mode_list[i]]
-			       .modemask) &
+			if (!((~max1363_mode_table[ci->mode_list[i]].modemask) &
 			      mask))
-				return &max1363_mode_table[ci
-							   ->mode_list[i]];
-	return 0;
+				return &max1363_mode_table[ci->mode_list[i]];
+	return NULL;
 };
 
 static ssize_t max1363_show_precision(struct device *dev,
@@ -298,7 +297,7 @@
 			st->chip_info->int_vref_mv >> st->chip_info->bits);
 }
 
-IIO_DEVICE_ATTR(in_scale, S_IRUGO, max1363_show_scale, NULL, 0);
+static IIO_DEVICE_ATTR(in_scale, S_IRUGO, max1363_show_scale, NULL, 0);
 
 static ssize_t max1363_show_name(struct device *dev,
 				 struct device_attribute *attr,
@@ -309,7 +308,7 @@
 	return sprintf(buf, "%s\n", st->chip_info->name);
 }
 
-IIO_DEVICE_ATTR(name, S_IRUGO, max1363_show_name, NULL, 0);
+static IIO_DEVICE_ATTR(name, S_IRUGO, max1363_show_name, NULL, 0);
 
 /* Applies to max1363 */
 static const enum max1363_modes max1363_mode_list[] = {
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
https://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits

Reply via email to