mirror of
https://github.com/torvalds/linux.git
synced 2024-11-22 12:11:40 +00:00
locomo: make locomo_bus_type constant and static
Now that the driver core can properly handle constant struct bus_type, move the locomo_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. It's also never used outside of arch/arm/common/locomo.c so make it static and don't export it as no one is using it. Cc: Russell King <linux@armlinux.org.uk> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Randy Dunlap <rdunlap@infradead.org> Cc: <linux-arm-kernel@lists.infradead.org> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Reviewed-by: Arnd Bergmann <arnd@arndb.de> Link: https://lore.kernel.org/r/2023121905-idiom-opossum-1ba3@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
86438841e4
commit
2e9bf5cc91
@ -68,6 +68,8 @@ struct locomo {
|
||||
#endif
|
||||
};
|
||||
|
||||
static const struct bus_type locomo_bus_type;
|
||||
|
||||
struct locomo_dev_info {
|
||||
unsigned long offset;
|
||||
unsigned long length;
|
||||
@ -842,7 +844,7 @@ static void locomo_bus_remove(struct device *dev)
|
||||
drv->remove(ldev);
|
||||
}
|
||||
|
||||
struct bus_type locomo_bus_type = {
|
||||
static const struct bus_type locomo_bus_type = {
|
||||
.name = "locomo-bus",
|
||||
.match = locomo_match,
|
||||
.probe = locomo_bus_probe,
|
||||
|
@ -158,8 +158,6 @@
|
||||
#define LOCOMO_LPT_TOH(TOH) ((TOH & 0x7) << 4)
|
||||
#define LOCOMO_LPT_TOL(TOL) ((TOL & 0x7))
|
||||
|
||||
extern struct bus_type locomo_bus_type;
|
||||
|
||||
#define LOCOMO_DEVID_KEYBOARD 0
|
||||
#define LOCOMO_DEVID_FRONTLIGHT 1
|
||||
#define LOCOMO_DEVID_BACKLIGHT 2
|
||||
|
Loading…
Reference in New Issue
Block a user