From: Randy Dunlap Date: Fri, 21 Aug 2009 20:59:08 +0000 (-0700) Subject: Staging: iio: fix duplicate dev_attr_name X-Git-Tag: MMI-PSA29.97-13-9~26941^2~83 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2fdec57610309f2cf67a8c0a82d262045bcd8c41;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git Staging: iio: fix duplicate dev_attr_name 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 Signed-off-by: Andrew Morton Cc: Jonathan Cameron Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c index ba7452d2b65a..c21198d18c90 100644 --- a/drivers/staging/iio/accel/lis3l02dq_ring.c +++ b/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -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, diff --git a/drivers/staging/iio/trigger/iio-trig-gpio.c b/drivers/staging/iio/trigger/iio-trig-gpio.c index 0b3b43ebee6b..539e4169a02e 100644 --- a/drivers/staging/iio/trigger/iio-trig-gpio.c +++ b/drivers/staging/iio/trigger/iio-trig-gpio.c @@ -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, diff --git a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c index 28c1d2d4a42b..e310dc009855 100644 --- a/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c +++ b/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c @@ -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);