[0/2] drivers: media: struct bus_type cleanup

Message ID 20240203-bus_cleanup-media-v1-0-33e8feeab912@marliere.net (mailing list archive)
Headers
Series drivers: media: struct bus_type cleanup |

Message

Ricardo B. Marliere Feb. 3, 2024, 3:31 p.m. UTC
  This series is part of an effort to cleanup the users of the driver
core, as can be seen in many recent patches authored by Greg across the
tree (e.g. [1]). Specifically, this series is part of the task of
splitting one of his TODOs [2].

---
[1]: https://lore.kernel.org/lkml/?q=f%3Agregkh%40linuxfoundation.org+s%3A%22make%22+and+s%3A%22const%22
[2]: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git/commit/?h=bus_cleanup&id=26105f537f0c60eacfeb430abd2e05d7ddcdd8aa

Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>

---
Ricardo B. Marliere (2):
      media: cec: make cec_bus_type const
      media: media-devnode: make media_bus_type const

 drivers/media/cec/core/cec-core.c | 2 +-
 drivers/media/mc/mc-devnode.c     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
base-commit: 41bccc98fb7931d63d03f326a746ac4d429c1dd3
change-id: 20240203-bus_cleanup-media-0ee6e332fef5

Best regards,
  

Comments

Greg KH Feb. 3, 2024, 3:58 p.m. UTC | #1
On Sat, Feb 03, 2024 at 12:31:27PM -0300, Ricardo B. Marliere wrote:
> 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 <gregkh@linuxfoundation.org>
> Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
> ---
>  drivers/media/mc/mc-devnode.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>