aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/base/class.c')
-rw-r--r--drivers/base/class.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 3ce845471327..8b7818b80056 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -135,7 +135,7 @@ static int add_class_attrs(struct class *cls)
135 int error = 0; 135 int error = 0;
136 136
137 if (cls->class_attrs) { 137 if (cls->class_attrs) {
138 for (i = 0; attr_name(cls->class_attrs[i]); i++) { 138 for (i = 0; cls->class_attrs[i].attr.name; i++) {
139 error = class_create_file(cls, &cls->class_attrs[i]); 139 error = class_create_file(cls, &cls->class_attrs[i]);
140 if (error) 140 if (error)
141 goto error; 141 goto error;
@@ -154,7 +154,7 @@ static void remove_class_attrs(struct class *cls)
154 int i; 154 int i;
155 155
156 if (cls->class_attrs) { 156 if (cls->class_attrs) {
157 for (i = 0; attr_name(cls->class_attrs[i]); i++) 157 for (i = 0; cls->class_attrs[i].attr.name; i++)
158 class_remove_file(cls, &cls->class_attrs[i]); 158 class_remove_file(cls, &cls->class_attrs[i]);
159 } 159 }
160} 160}