From: Ricardo B. Marliere Date: Sat, 3 Feb 2024 15:31:26 +0000 (-0300) Subject: media: cec: make cec_bus_type const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=009d312a3fd93a2bfed93d7a1c76e1f362384f08;p=linux.git media: cec: make cec_bus_type const Now that the driver core can properly handle constant struct bus_type, move the cec_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Greg Kroah-Hartman Suggested-by: Greg Kroah-Hartman Signed-off-by: Ricardo B. Marliere Reviewed-by: Greg Kroah-Hartman Reviewed-by: Laurent Pinchart Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/cec/core/cec-core.c b/drivers/media/cec/core/cec-core.c index 7e153c5cad04f..5a54db839e5d6 100644 --- a/drivers/media/cec/core/cec-core.c +++ b/drivers/media/cec/core/cec-core.c @@ -93,7 +93,7 @@ static void cec_devnode_release(struct device *cd) cec_delete_adapter(to_cec_adapter(devnode)); } -static struct bus_type cec_bus_type = { +static const struct bus_type cec_bus_type = { .name = CEC_NAME, };