summaryrefslogtreecommitdiff
path: root/drivers/peci/device.c
diff options
context:
space:
mode:
authorRicardo B. Marliere <ricardo@marliere.net>2024-02-19 15:36:35 +0300
committerIwona Winiarska <iwona.winiarska@intel.com>2024-04-16 01:14:43 +0300
commite6faf2b750ebf3837a63ebe465e7b7933502bdc4 (patch)
tree22dedecca37b35c9320a2f3d80dea056c535ff38 /drivers/peci/device.c
parented8c2dad25eb2fbaa61f2e32385ecc1aa34c2355 (diff)
downloadlinux-e6faf2b750ebf3837a63ebe465e7b7933502bdc4.tar.xz
peci: constify the struct device_type usage
Since commit aed65af1cc2f ("drivers: make device_type const"), the driver core can properly handle constant struct device_type. Move the peci_controller_type and peci_device_type variables to be constant structures as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: "Ricardo B. Marliere" <ricardo@marliere.net> Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com> Link: https://lore.kernel.org/r/20240219-device_cleanup-peci-v1-1-0727662616f7@marliere.net Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Diffstat (limited to 'drivers/peci/device.c')
-rw-r--r--drivers/peci/device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/peci/device.c b/drivers/peci/device.c
index e6b0bffb14f4..ee01f03c29b7 100644
--- a/drivers/peci/device.c
+++ b/drivers/peci/device.c
@@ -246,7 +246,7 @@ static void peci_device_release(struct device *dev)
kfree(device);
}
-struct device_type peci_device_type = {
+const struct device_type peci_device_type = {
.groups = peci_device_groups,
.release = peci_device_release,
};