Commit 7b77d065 authored by Jean Delvare's avatar Jean Delvare Committed by Jean Delvare

i2c: Use the __ATTR macro where possible

Signed-off-by: default avatarJean Delvare <khali@linux-fr.org>
parent 438d6c2c
...@@ -128,14 +128,11 @@ static ssize_t show_client_name(struct device *dev, struct device_attribute *att ...@@ -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 * We can't use the DEVICE_ATTR() macro here, as we used the same name for
* different type of a device. So beware if the DEVICE_ATTR() macro ever * an i2c adapter attribute (above).
* changes, this definition will also have to change.
*/ */
static struct device_attribute dev_attr_client_name = { static struct device_attribute dev_attr_client_name =
.attr = {.name = "name", .mode = S_IRUGO, .owner = THIS_MODULE }, __ATTR(name, S_IRUGO, &show_client_name, NULL);
.show = &show_client_name,
};
/* --------------------------------------------------- /* ---------------------------------------------------
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment