sysfs.h: remove attr_name() macro

Gotta love a macro that doesn't reduce the typing you have to do.

Also, only the driver core, and one network driver uses this.  The
driver core functions will be going away soon, and I'll convert the
network driver soon to not need this as well, so delete it for now
before anyone else gets some bright ideas and wants to use it.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman
2013-08-22 10:25:34 -07:00
parent 09239ed4aa
commit 3e1026b3fa
5 changed files with 13 additions and 15 deletions

View File

@@ -440,7 +440,7 @@ static int device_add_attributes(struct device *dev,
int i;
if (attrs) {
for (i = 0; attr_name(attrs[i]); i++) {
for (i = 0; attrs[i].attr.name; i++) {
error = device_create_file(dev, &attrs[i]);
if (error)
break;
@@ -458,7 +458,7 @@ static void device_remove_attributes(struct device *dev,
int i;
if (attrs)
for (i = 0; attr_name(attrs[i]); i++)
for (i = 0; attrs[i].attr.name; i++)
device_remove_file(dev, &attrs[i]);
}
@@ -469,7 +469,7 @@ static int device_add_bin_attributes(struct device *dev,
int i;
if (attrs) {
for (i = 0; attr_name(attrs[i]); i++) {
for (i = 0; attrs[i].attr.name; i++) {
error = device_create_bin_file(dev, &attrs[i]);
if (error)
break;
@@ -487,7 +487,7 @@ static void device_remove_bin_attributes(struct device *dev,
int i;
if (attrs)
for (i = 0; attr_name(attrs[i]); i++)
for (i = 0; attrs[i].attr.name; i++)
device_remove_bin_file(dev, &attrs[i]);
}