Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7b77d065d1e79a9c0b1b114d059b3bc3d8206c4d
Commit:     7b77d065d1e79a9c0b1b114d059b3bc3d8206c4d
Parent:     438d6c2c015cf63bf7e9bdc2033d435433ac8455
Author:     Jean Delvare <[EMAIL PROTECTED]>
AuthorDate: Sun Dec 10 21:21:31 2006 +0100
Committer:  Jean Delvare <[EMAIL PROTECTED]>
CommitDate: Sun Dec 10 21:21:31 2006 +0100

    i2c: Use the __ATTR macro where possible
    
    Signed-off-by: Jean Delvare <[EMAIL PROTECTED]>
---
 drivers/i2c/i2c-core.c |   11 ++++-------
 1 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 64f11e0..3e31f1d 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -128,14 +128,11 @@ static ssize_t show_client_name(struct device *dev, 
struct device_attribute *att
 }
 
 /*
- * We can't use the DEVICE_ATTR() macro here as we want the same filename for a
- * different type of a device.  So beware if the DEVICE_ATTR() macro ever
- * changes, this definition will also have to change.
+ * We can't use the DEVICE_ATTR() macro here, as we used the same name for
+ * an i2c adapter attribute (above).
  */
-static struct device_attribute dev_attr_client_name = {
-       .attr   = {.name = "name", .mode = S_IRUGO, .owner = THIS_MODULE },
-       .show   = &show_client_name,
-};
+static struct device_attribute dev_attr_client_name =
+       __ATTR(name, S_IRUGO, &show_client_name, NULL);
 
 
 /* ---------------------------------------------------
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to