Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

maple: make maple_bus_type static and const

There is no need to export maple_bus_type as no one uses it outside of
maple.c, so make it static, AND make it const as it can be read-only as
no one modifies it.

Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Rich Felker <dalias@libc.org>
Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
Cc: <linux-sh@vger.kernel.org>
Link: https://lore.kernel.org/r/2023121918-rejoicing-frostlike-d976@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+2 -3
+2 -2
drivers/sh/maple/maple.c
··· 59 59 static bool checked[MAPLE_PORTS]; 60 60 static bool empty[MAPLE_PORTS]; 61 61 static struct maple_device *baseunits[MAPLE_PORTS]; 62 + static const struct bus_type maple_bus_type; 62 63 63 64 /** 64 65 * maple_driver_register - register a maple driver ··· 774 773 /* 775 774 * maple_bus_type - core maple bus structure 776 775 */ 777 - struct bus_type maple_bus_type = { 776 + static const struct bus_type maple_bus_type = { 778 777 .name = "maple", 779 778 .match = maple_match_bus_driver, 780 779 }; 781 - EXPORT_SYMBOL_GPL(maple_bus_type); 782 780 783 781 static struct device maple_bus = { 784 782 .init_name = "maple",
-1
include/linux/maple.h
··· 5 5 #include <mach/maple.h> 6 6 7 7 struct device; 8 - extern struct bus_type maple_bus_type; 9 8 10 9 /* Maple Bus command and response codes */ 11 10 enum maple_code {