Commit 43718dca authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

driver core: class.h: remove extern from function prototypes

The kernel coding style does not require 'extern' in function prototypes
in .h files, so remove them from include/linux/device/class.h as they
are not needed.
Acked-by: default avatarRafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230324100132.1633647-2-gregkh@linuxfoundation.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dcfbb67e
...@@ -82,8 +82,9 @@ struct class_dev_iter { ...@@ -82,8 +82,9 @@ struct class_dev_iter {
extern struct kobject *sysfs_dev_block_kobj; extern struct kobject *sysfs_dev_block_kobj;
extern struct kobject *sysfs_dev_char_kobj; extern struct kobject *sysfs_dev_char_kobj;
extern int __must_check class_register(struct class *class);
extern void class_unregister(struct class *class); int __must_check class_register(struct class *class);
void class_unregister(struct class *class);
struct class_compat; struct class_compat;
struct class_compat *class_compat_register(const char *name); struct class_compat *class_compat_register(const char *name);
...@@ -93,19 +94,15 @@ int class_compat_create_link(struct class_compat *cls, struct device *dev, ...@@ -93,19 +94,15 @@ int class_compat_create_link(struct class_compat *cls, struct device *dev,
void class_compat_remove_link(struct class_compat *cls, struct device *dev, void class_compat_remove_link(struct class_compat *cls, struct device *dev,
struct device *device_link); struct device *device_link);
extern void class_dev_iter_init(struct class_dev_iter *iter, void class_dev_iter_init(struct class_dev_iter *iter, const struct class *class,
const struct class *class, const struct device *start, const struct device_type *type);
const struct device *start, struct device *class_dev_iter_next(struct class_dev_iter *iter);
const struct device_type *type); void class_dev_iter_exit(struct class_dev_iter *iter);
extern struct device *class_dev_iter_next(struct class_dev_iter *iter);
extern void class_dev_iter_exit(struct class_dev_iter *iter);
extern int class_for_each_device(const struct class *class, const struct device *start, int class_for_each_device(const struct class *class, const struct device *start, void *data,
void *data, int (*fn)(struct device *dev, void *data));
int (*fn)(struct device *dev, void *data)); struct device *class_find_device(const struct class *class, const struct device *start,
extern struct device *class_find_device(const struct class *class, const void *data, int (*match)(struct device *, const void *));
const struct device *start, const void *data,
int (*match)(struct device *, const void *));
/** /**
* class_find_device_by_name - device iterator for locating a particular device * class_find_device_by_name - device iterator for locating a particular device
...@@ -191,12 +188,10 @@ struct class_attribute { ...@@ -191,12 +188,10 @@ struct class_attribute {
#define CLASS_ATTR_WO(_name) \ #define CLASS_ATTR_WO(_name) \
struct class_attribute class_attr_##_name = __ATTR_WO(_name) struct class_attribute class_attr_##_name = __ATTR_WO(_name)
extern int __must_check class_create_file_ns(const struct class *class, int __must_check class_create_file_ns(const struct class *class, const struct class_attribute *attr,
const struct class_attribute *attr, const void *ns);
const void *ns); void class_remove_file_ns(const struct class *class, const struct class_attribute *attr,
extern void class_remove_file_ns(const struct class *class, const void *ns);
const struct class_attribute *attr,
const void *ns);
static inline int __must_check class_create_file(const struct class *class, static inline int __must_check class_create_file(const struct class *class,
const struct class_attribute *attr) const struct class_attribute *attr)
...@@ -223,8 +218,7 @@ struct class_attribute_string { ...@@ -223,8 +218,7 @@ struct class_attribute_string {
struct class_attribute_string class_attr_##_name = \ struct class_attribute_string class_attr_##_name = \
_CLASS_ATTR_STRING(_name, _mode, _str) _CLASS_ATTR_STRING(_name, _mode, _str)
extern ssize_t show_class_attr_string(struct class *class, struct class_attribute *attr, ssize_t show_class_attr_string(struct class *class, struct class_attribute *attr, char *buf);
char *buf);
struct class_interface { struct class_interface {
struct list_head node; struct list_head node;
...@@ -234,10 +228,10 @@ struct class_interface { ...@@ -234,10 +228,10 @@ struct class_interface {
void (*remove_dev) (struct device *, struct class_interface *); void (*remove_dev) (struct device *, struct class_interface *);
}; };
extern int __must_check class_interface_register(struct class_interface *); int __must_check class_interface_register(struct class_interface *);
extern void class_interface_unregister(struct class_interface *); void class_interface_unregister(struct class_interface *);
extern struct class * __must_check class_create(const char *name); struct class * __must_check class_create(const char *name);
extern void class_destroy(struct class *cls); void class_destroy(struct class *cls);
#endif /* _DEVICE_CLASS_H_ */ #endif /* _DEVICE_CLASS_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment