From e6faf2b750ebf3837a63ebe465e7b7933502bdc4 Mon Sep 17 00:00:00 2001 From: "Ricardo B. Marliere" Date: Mon, 19 Feb 2024 09:36:35 -0300 Subject: 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 Signed-off-by: "Ricardo B. Marliere" Reviewed-by: Iwona Winiarska Link: https://lore.kernel.org/r/20240219-device_cleanup-peci-v1-1-0727662616f7@marliere.net Signed-off-by: Iwona Winiarska --- drivers/peci/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/peci/core.c') diff --git a/drivers/peci/core.c b/drivers/peci/core.c index b2f8db967e9b..8f8bda2f2a62 100644 --- a/drivers/peci/core.c +++ b/drivers/peci/core.c @@ -25,7 +25,7 @@ static void peci_controller_dev_release(struct device *dev) kfree(controller); } -struct device_type peci_controller_type = { +const struct device_type peci_controller_type = { .release = peci_controller_dev_release, }; -- cgit v1.2.3-70-g09d2