dmaengine: idxd: constify the struct device_type usage
authorRicardo B. Marliere <ricardo@marliere.net>
Mon, 19 Feb 2024 11:46:56 +0000 (08:46 -0300)
committerVinod Koul <vkoul@kernel.org>
Thu, 22 Feb 2024 13:59:31 +0000 (19:29 +0530)
commit1e0a2852a134833f6827de15cd62ea0ed19f1b60
tree971179e917360dcc25cf26b68a74e89ec19a48ca
parent35b78e2eef2d75c8722bf39d6bd1d89a8e21479e
dmaengine: idxd: 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
dsa_device_type, iax_device_type, idxd_wq_device_type, idxd_cdev_file_type,
idxd_cdev_device_type and idxd_group_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: Fenghua Yu <fenghua.yu@intel.com>
Link: https://lore.kernel.org/r/20240219-device_cleanup-dmaengine-v1-1-9f72f3cf3587@marliere.net
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/cdev.c
drivers/dma/idxd/idxd.h
drivers/dma/idxd/sysfs.c