From: Ricardo B. Marliere Date: Sat, 3 Feb 2024 15:31:27 +0000 (-0300) Subject: media: media-devnode: make media_bus_type const X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e248cde98470ca3d9449e2b744b11279681f8e18;p=linux.git media: media-devnode: make media_bus_type const Now that the driver core can properly handle constant struct bus_type, move the media_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: Laurent Pinchart Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/mc/mc-devnode.c b/drivers/media/mc/mc-devnode.c index 9c8fe9335dc1c..7f67825c8757f 100644 --- a/drivers/media/mc/mc-devnode.c +++ b/drivers/media/mc/mc-devnode.c @@ -63,7 +63,7 @@ static void media_devnode_release(struct device *cd) pr_debug("%s: Media Devnode Deallocated\n", __func__); } -static struct bus_type media_bus_type = { +static const struct bus_type media_bus_type = { .name = MEDIA_NAME, };