mirror of
https://github.com/torvalds/linux.git
synced 2026-11-23 23:11:40 +00:00
siox: constify the struct device_type usage
Since commit aed65af1cc ("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 <[email protected]>
Signed-off-by: "Ricardo B. Marliere" <[email protected]>
Acked-by: Uwe Kleine-König <[email protected]>
Acked-by: Thorsten Scherer <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cb1c122419
commit
6501ac11b9
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user