Use the __ATTR macro where possible. Signed-off-by: Jean Delvare --- drivers/i2c/i2c-core.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) --- linux-2.6.19-rc6.orig/drivers/i2c/i2c-core.c 2006-11-19 12:25:07.000000000 +0100 +++ linux-2.6.19-rc6/drivers/i2c/i2c-core.c 2006-11-19 13:26:53.000000000 +0100 @@ -128,14 +128,11 @@ } /* - * 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); /* ---------------------------------------------------