Skip to content

Commit 779aeb7

Browse files
committed
driver core: class: move EXPORT_SYMBOL_GPL() lines to the correct place
For some reason, the drivers/base/class.c file still had the "old style" of exports, at the end of the file. Move the exports to the proper location, right after the function, to be correct. Reviewed-by: Rafael J. Wysocki <rafael@kernel.org> Link: https://lore.kernel.org/r/20230214144117.158956-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 17c4576 commit 779aeb7

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

drivers/base/class.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,13 +99,15 @@ int class_create_file_ns(struct class *cls, const struct class_attribute *attr,
9999
error = -EINVAL;
100100
return error;
101101
}
102+
EXPORT_SYMBOL_GPL(class_create_file_ns);
102103

103104
void class_remove_file_ns(struct class *cls, const struct class_attribute *attr,
104105
const void *ns)
105106
{
106107
if (cls)
107108
sysfs_remove_file_ns(&cls->p->subsys.kobj, &attr->attr, ns);
108109
}
110+
EXPORT_SYMBOL_GPL(class_remove_file_ns);
109111

110112
static struct class *class_get(struct class *cls)
111113
{
@@ -213,6 +215,7 @@ void class_unregister(struct class *cls)
213215
class_remove_groups(cls, cls->class_groups);
214216
kset_unregister(&cls->p->subsys);
215217
}
218+
EXPORT_SYMBOL_GPL(class_unregister);
216219

217220
static void class_create_release(struct class *cls)
218221
{
@@ -276,6 +279,7 @@ void class_destroy(struct class *cls)
276279

277280
class_unregister(cls);
278281
}
282+
EXPORT_SYMBOL_GPL(class_destroy);
279283

280284
/**
281285
* class_dev_iter_init - initialize class device iterator
@@ -460,6 +464,7 @@ int class_interface_register(struct class_interface *class_intf)
460464

461465
return 0;
462466
}
467+
EXPORT_SYMBOL_GPL(class_interface_register);
463468

464469
void class_interface_unregister(struct class_interface *class_intf)
465470
{
@@ -482,6 +487,7 @@ void class_interface_unregister(struct class_interface *class_intf)
482487

483488
class_put(parent);
484489
}
490+
EXPORT_SYMBOL_GPL(class_interface_unregister);
485491

486492
ssize_t show_class_attr_string(struct class *class,
487493
struct class_attribute *attr, char *buf)
@@ -588,11 +594,3 @@ int __init classes_init(void)
588594
return -ENOMEM;
589595
return 0;
590596
}
591-
592-
EXPORT_SYMBOL_GPL(class_create_file_ns);
593-
EXPORT_SYMBOL_GPL(class_remove_file_ns);
594-
EXPORT_SYMBOL_GPL(class_unregister);
595-
EXPORT_SYMBOL_GPL(class_destroy);
596-
597-
EXPORT_SYMBOL_GPL(class_interface_register);
598-
EXPORT_SYMBOL_GPL(class_interface_unregister);

0 commit comments

Comments
 (0)