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:
@@ -135,7 +135,7 @@ static int add_class_attrs(struct class *cls)
|
||||
int error = 0;
|
||||
|
||||
if (cls->class_attrs) {
|
||||
for (i = 0; attr_name(cls->class_attrs[i]); i++) {
|
||||
for (i = 0; cls->class_attrs[i].attr.name; i++) {
|
||||
error = class_create_file(cls, &cls->class_attrs[i]);
|
||||
if (error)
|
||||
goto error;
|
||||
@@ -154,7 +154,7 @@ static void remove_class_attrs(struct class *cls)
|
||||
int i;
|
||||
|
||||
if (cls->class_attrs) {
|
||||
for (i = 0; attr_name(cls->class_attrs[i]); i++)
|
||||
for (i = 0; cls->class_attrs[i].attr.name; i++)
|
||||
class_remove_file(cls, &cls->class_attrs[i]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user