From: Randy Dunlap <randy.dunlap@xxxxxxxxxx> 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@xxxxxxxxxx> --- drivers/staging/iio/accel/lis3l02dq_ring.c | 2 +- drivers/staging/iio/trigger/iio-trig-gpio.c | 2 +- drivers/staging/iio/trigger/iio-trig-periodic-rtc.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) --- linux-next-20090821.orig/drivers/staging/iio/accel/lis3l02dq_ring.c +++ linux-next-20090821/drivers/staging/iio/accel/lis3l02dq_ring.c @@ -441,7 +441,7 @@ static int lis3l02dq_data_rdy_trigger_se &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, --- linux-next-20090821.orig/drivers/staging/iio/trigger/iio-trig-gpio.c +++ linux-next-20090821/drivers/staging/iio/trigger/iio-trig-gpio.c @@ -46,7 +46,7 @@ static irqreturn_t iio_gpio_trigger_poll 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, --- linux-next-20090821.orig/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c +++ linux-next-20090821/drivers/staging/iio/trigger/iio-trig-periodic-rtc.c @@ -81,10 +81,10 @@ static ssize_t iio_trig_periodic_read_na 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); --- ~Randy LPC 2009, Sept. 23-25, Portland, Oregon http://linuxplumbersconf.org/2009/ -- To unsubscribe from this list: send the line "unsubscribe linux-next" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html