From: Randy Dunlap <randy.dunlap@oracle.com>
To: Stephen Rothwell <sfr@canb.auug.org.au>, gregkh@suse.de
Cc: linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
akpm <akpm@linux-foundation.org>
Subject: [PATCH -next] staging/iio: fix duplicate dev_attr_name
Date: Fri, 21 Aug 2009 13:59:08 -0700 [thread overview]
Message-ID: <20090821135908.259b222f.randy.dunlap@oracle.com> (raw)
In-Reply-To: <20090821164140.71968b47.sfr@canb.auug.org.au>
From: Randy Dunlap <randy.dunlap@oracle.com>
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>
---
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/
next prev parent reply other threads:[~2009-08-21 20:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-21 6:41 linux-next: Tree for August 21 Stephen Rothwell
2009-08-21 20:59 ` Randy Dunlap [this message]
2009-08-21 21:00 ` [PATCH -next] tracing/syscalls: fix printk formats Randy Dunlap
2009-08-21 21:04 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090821135908.259b222f.randy.dunlap@oracle.com \
--to=randy.dunlap@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=gregkh@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.