soundwire: constify the struct device_type usage
authorRicardo B. Marliere <ricardo@marliere.net>
Mon, 19 Feb 2024 12:14:36 +0000 (09:14 -0300)
committerVinod Koul <vkoul@kernel.org>
Sun, 3 Mar 2024 13:58:06 +0000 (19:28 +0530)
commit99fea943d9dc2500227bced9acd671e5b39a1471
tree92b238d9eadf8ca97fca919c4d21d76eec62de8d
parent81a7d0c4d059cb5c122110acbeec7bedfb91a741
soundwire: 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
sdw_master_type and sdw_slave_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>
Link: https://lore.kernel.org/r/20240219-device_cleanup-soundwire-v1-1-9edd51767611@marliere.net
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/soundwire/master.c
drivers/soundwire/slave.c
include/linux/soundwire/sdw_type.h