Skip to content

Commit 5eac636

Browse files
committed
fsi: make fsi_bus_type constant
Now that the driver core can properly handle constant struct bus_type, move the fsi_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Ninad Palsule <ninad@linux.ibm.com> Cc: linux-fsi@lists.ozlabs.org Reviewed-by: Eddie James <eajames@linux.ibm.com> Link: https://lore.kernel.org/r/2025070100-overblown-busily-a04b@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent b8e3603 commit 5eac636

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/fsi/fsi-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ void fsi_driver_unregister(struct fsi_driver *fsi_drv)
14041404
}
14051405
EXPORT_SYMBOL_GPL(fsi_driver_unregister);
14061406

1407-
struct bus_type fsi_bus_type = {
1407+
const struct bus_type fsi_bus_type = {
14081408
.name = "fsi",
14091409
.match = fsi_bus_match,
14101410
};

include/linux/fsi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ extern int fsi_slave_read(struct fsi_slave *slave, uint32_t addr,
6868
extern int fsi_slave_write(struct fsi_slave *slave, uint32_t addr,
6969
const void *val, size_t size);
7070

71-
extern struct bus_type fsi_bus_type;
71+
extern const struct bus_type fsi_bus_type;
7272
extern const struct device_type fsi_cdev_type;
7373

7474
enum fsi_dev_type {

0 commit comments

Comments
 (0)