From: Ricardo B. Marliere Date: Mon, 19 Feb 2024 19:49:30 +0000 (-0300) Subject: siox: constify the struct device_type usage X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6501ac11b90f1c9fe7208e95f69f80bf55286c3e;p=linux.git siox: 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 siox_device_type and siox_master_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" Acked-by: Uwe Kleine-König Acked-by: Thorsten Scherer Link: https://lore.kernel.org/r/20240219-device_cleanup-siox-v1-1-eb32ca2b0113@marliere.net Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/siox/siox-core.c b/drivers/siox/siox-core.c index 561408583b2bf..8eca20c2ea9c3 100644 --- a/drivers/siox/siox-core.c +++ b/drivers/siox/siox-core.c @@ -498,7 +498,7 @@ static void siox_device_release(struct device *dev) kfree(sdevice); } -static struct device_type siox_device_type = { +static const struct device_type siox_device_type = { .groups = siox_device_groups, .release = siox_device_release, }; @@ -676,7 +676,7 @@ static void siox_master_release(struct device *dev) kfree(smaster); } -static struct device_type siox_master_type = { +static const struct device_type siox_master_type = { .groups = siox_master_groups, .release = siox_master_release, };