[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091112002517.5660.74298.stgit@bob.kio>
Date: Wed, 11 Nov 2009 17:25:17 -0700
From: Alex Chiang <achiang@...com>
To: akpm@...ux-foundation.org, jens.axboe@...cle.com
Cc: James Bottomley <James.Bottomley@...senPartnership.com>,
Mike Miller <mikem@...rdog.cce.hp.com>,
linux-kernel@...r.kernel.org,
"Stephen M. Cameron" <scameron@...rdog.cce.hp.com>
Subject: [PATCH 2/2] hpsa: make device attrs static
No need to export those device attributes.
In fact, without this patch, we can trip over a build error if hpsa
is a built-in and another driver also declares and exports attributes
with the same name.
You'll see errors like:
drivers/scsi/built-in.o: multiple definition of `dev_attr_lunid'
drivers/block/built-in.o: first defined here
Cc: Stephen M. Cameron <scameron@...rdog.cce.hp.com>
Cc: Mike Miller <mikem@...rdog.cce.hp.com>
Cc: Jens Axboe <jens.axboe@...cle.com>
Cc: James Bottomley <James.Bottomley@...senPartnership.com>
Signed-off-by: Alex Chiang <achiang@...com>
---
drivers/scsi/hpsa.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index e402155..aae5f5a 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -146,11 +146,11 @@ static ssize_t lunid_show(struct device *dev,
static ssize_t unique_id_show(struct device *dev,
struct device_attribute *attr, char *buf);
-DEVICE_ATTR(raid_level, S_IRUGO, raid_level_show, NULL);
-DEVICE_ATTR(lunid, S_IRUGO, lunid_show, NULL);
-DEVICE_ATTR(unique_id, S_IRUGO, unique_id_show, NULL);
+static DEVICE_ATTR(raid_level, S_IRUGO, raid_level_show, NULL);
+static DEVICE_ATTR(lunid, S_IRUGO, lunid_show, NULL);
+static DEVICE_ATTR(unique_id, S_IRUGO, unique_id_show, NULL);
-struct device_attribute *hpsa_sdev_attrs[] = {
+static struct device_attribute *hpsa_sdev_attrs[] = {
&dev_attr_raid_level,
&dev_attr_lunid,
&dev_attr_unique_id,
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists