mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
peci: Make peci_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the peci_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net> Link: https://lore.kernel.org/r/20240210-bus_cleanup-peci-v1-1-1e64bef6efc0@marliere.net Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
This commit is contained in:
parent
0bbac3facb
commit
ed8c2dad25
@ -201,7 +201,7 @@ static void peci_bus_device_remove(struct device *dev)
|
||||
driver->remove(device);
|
||||
}
|
||||
|
||||
struct bus_type peci_bus_type = {
|
||||
const struct bus_type peci_bus_type = {
|
||||
.name = "peci",
|
||||
.match = peci_bus_device_match,
|
||||
.probe = peci_bus_device_probe,
|
||||
|
@ -81,7 +81,7 @@ extern const struct attribute_group *peci_device_groups[];
|
||||
int peci_device_create(struct peci_controller *controller, u8 addr);
|
||||
void peci_device_destroy(struct peci_device *device);
|
||||
|
||||
extern struct bus_type peci_bus_type;
|
||||
extern const struct bus_type peci_bus_type;
|
||||
extern const struct attribute_group *peci_bus_groups[];
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user