Skip to content

Commit

Permalink
driver core: make sysfs_dev_block_kobj static
Browse files Browse the repository at this point in the history
Nothing outside of drivers/base/core.c uses sysfs_dev_block_kobj, so
make it static and document what it is used for so we remember it the
next time we touch it 15 years from now.

Acked-by: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230331093318.82288-6-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Greg Kroah-Hartman committed Mar 31, 2023
1 parent e78195d commit 575ab41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion drivers/base/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -2256,7 +2256,9 @@ int (*platform_notify)(struct device *dev) = NULL;
int (*platform_notify_remove)(struct device *dev) = NULL;
static struct kobject *dev_kobj;
struct kobject *sysfs_dev_char_kobj;
struct kobject *sysfs_dev_block_kobj;

/* /sys/dev/block */
static struct kobject *sysfs_dev_block_kobj;

static DEFINE_MUTEX(device_hotplug_lock);

Expand Down
2 changes: 0 additions & 2 deletions include/linux/device/class.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,6 @@ struct class_dev_iter {
const struct device_type *type;
};

extern struct kobject *sysfs_dev_block_kobj;

int __must_check class_register(struct class *class);
void class_unregister(const struct class *class);
bool class_is_registered(const struct class *class);
Expand Down

0 comments on commit 575ab41

Please sign in to comment.