Staging: iio: fix duplicate dev_attr_name
authorRandy Dunlap <randy.dunlap@oracle.com>
Fri, 21 Aug 2009 20:59:08 +0000 (13:59 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:02:26 +0000 (12:02 -0700)
device attr's should be static, otherwise duplicate identifiers are
created:

drivers/staging/iio/trigger/iio-trig-gpio.o:(.data+0x1c): multiple definition of `dev_attr_name'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/iio/accel/lis3l02dq_ring.c
drivers/staging/iio/trigger/iio-trig-gpio.c
drivers/staging/iio/trigger/iio-trig-periodic-rtc.c

index ba7452d2b65adc3e2095d95924432b374166bd78..c21198d18c90451ef7a2d3cf060371b5adb66c21 100644 (file)
@@ -441,7 +441,7 @@ static int lis3l02dq_data_rdy_trigger_set_state(struct iio_trigger *trig,
                                 &t);
        return ret;
 }
-DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
 
 static struct attribute *lis3l02dq_trigger_attrs[] = {
        &dev_attr_name.attr,
index 0b3b43ebee6bac44c75cf20c2d407a1f223d6a15..539e4169a02e8bc32b21c56c2f47b8fb5735e7cf 100644 (file)
@@ -46,7 +46,7 @@ static irqreturn_t iio_gpio_trigger_poll(int irq, void *private)
        return IRQ_HANDLED;
 }
 
-DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
+static DEVICE_ATTR(name, S_IRUGO, iio_trigger_read_name, NULL);
 
 static struct attribute *iio_gpio_trigger_attrs[] = {
        &dev_attr_name.attr,
index 28c1d2d4a42bb08972ebeacb0f1fcd9b8d23365b..e310dc0098559c424d5100d03401109d2976d21c 100644 (file)
@@ -81,10 +81,10 @@ static ssize_t iio_trig_periodic_read_name(struct device *dev,
        return sprintf(buf, "%s\n", trig_info->name);
 }
 
-DEVICE_ATTR(name, S_IRUGO,
+static DEVICE_ATTR(name, S_IRUGO,
            iio_trig_periodic_read_name,
            NULL);
-DEVICE_ATTR(frequency, S_IRUGO | S_IWUSR,
+static DEVICE_ATTR(frequency, S_IRUGO | S_IWUSR,
            iio_trig_periodic_read_freq,
            iio_trig_periodic_write_freq);