drivers: drm: struct bus_type cleanup
Subsystems (2)
cover drivers: drm: struct bus_type cleanup
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
To: Maarten Lankhorst <[email protected]>
To: Maxime Ripard <[email protected]>
To: Thomas Zimmermann <[email protected]>
To: David Airlie <[email protected]>
To: Daniel Vetter <[email protected]>
---
Ricardo B. Marliere (2):
drm: display: make dp_aux_bus_type const
drm: mipi-dsi: make mipi_dsi_bus_type const
drivers/gpu/drm/display/drm_dp_aux_bus.c | 2 +- drivers/gpu/drm/drm_mipi_dsi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
---
base-commit: 3d94e7584486f7ac4a44fe215330ae6a1094e492
change-id: 20240203-bus_cleanup-gpu-0f90574bce24
Best regards,
Signature · 1 line
Ricardo B. Marliere <[email protected]>
PATCH 1/2 drm: display: make dp_aux_bus_type const
Now that the driver core can properly handle constant struct bus_type, move the dp_aux_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime.
--- drivers/gpu/drm/display/drm_dp_aux_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/display/drm_dp_aux_bus.c +1 -1
@@ -127,7 +127,7 @@ static void dp_aux_ep_shutdown(struct device *dev) aux_ep_drv->shutdown (to_dp_aux_ep_dev (dev)); } -static struct bus_type dp_aux_bus_type = { +static const struct bus_type dp_aux_bus_type = { .name ="dp-aux" , .match = dp_aux_ep_match, .probe = dp_aux_ep_probe,
Signature · 1 line
2.43.0
Re: [PATCH 1/2] drm: display: make dp_aux_bus_type const
Quoted 8 lines · Ricardo B. Marliere
Now that the driver core can properly handle constant struct
bus_type, move thedp_aux_bus_typevariable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime.Cc Greg Kroah-Hartman <[email protected]>Suggested-by Greg Kroah-Hartman <[email protected]>Signed-off-by Ricardo B. Marliere <[email protected]>
Quoted 3 lines
--- drivers/gpu/drm/display/drm_dp_aux_bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
With best wishes Dmitry
Re: [PATCH 1/2] drm: display: make dp_aux_bus_type const
Quoted 11 lines · Dmitry Baryshkov
Quoted 8 lines · Ricardo B. Marliere
Now that the driver core can properly handle constant struct
bus_type, move thedp_aux_bus_typevariable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime.Cc Greg Kroah-Hartman <[email protected]>Suggested-by Greg Kroah-Hartman <[email protected]>Signed-off-by Ricardo B. Marliere <[email protected]>Reviewed-by Dmitry Baryshkov <[email protected]>
Just to make sure this doesn't fall through cracks, I'm assuming you'll push this to drm-misc-next too, right?
-Sima
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Re: [PATCH 1/2] drm: display: make dp_aux_bus_type const
Quoted 8 lines · Daniel Vetter
Quoted 6 lines · Dmitry Baryshkov
Quoted 5 lines · Ricardo B. Marliere
Now that the driver core can properly handle constant struct
bus_type, move thedp_aux_bus_typevariable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime.
Quoted 8 lines
Quoted 5 lines
Quoted 3 lines
Cc Greg Kroah-Hartman <[email protected]>Suggested-by Greg Kroah-Hartman <[email protected]>Signed-off-by Ricardo B. Marliere <[email protected]>Reviewed-by Dmitry Baryshkov <[email protected]>Just to make sure this doesn't fall through cracks, I'm assuming you'll push this to drm-misc-next too, right?
I was out at FOSDEM, now done.
Signature · 2 lines
With best wishes Dmitry
PATCH 2/2 drm: mipi-dsi: make mipi_dsi_bus_type const
In reply to Ricardo B. MarliereNow that the driver core can properly handle constant struct bus_type, move the mipi_dsi_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime.
--- drivers/gpu/drm/drm_mipi_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/drm_mipi_dsi.c +1 -1
@@ -89,7 +89,7 @@ static const struct dev_pm_ops mipi_dsi_device_pm_ops = { .restore = pm_generic_restore, }; -static struct bus_type mipi_dsi_bus_type = { +static const struct bus_type mipi_dsi_bus_type = { .name ="mipi-dsi" , .match = mipi_dsi_device_match, .uevent = mipi_dsi_uevent,
Signature · 1 line
2.43.0
Re: [PATCH 2/2] drm: mipi-dsi: make mipi_dsi_bus_type const
Quoted 11 lines · Ricardo B. Marliere
Now that the driver core can properly handle constant struct
bus_type, move themipi_dsi_bus_typevariable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime.Cc Greg Kroah-Hartman <[email protected]>Suggested-by Greg Kroah-Hartman <[email protected]>Signed-off-by Ricardo B. Marliere <[email protected]>--- drivers/gpu/drm/drm_mipi_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Signature · 2 lines
With best wishes Dmitry
Quoted 19 lines · Ricardo B. Marliere
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=26105f537f0c60eacfeb430abd2e05d7ddcdd8aaTo: Maarten Lankhorst <[email protected]>
To: Maxime Ripard <[email protected]>
To: Thomas Zimmermann <[email protected]>
To: David Airlie <[email protected]>
To: Daniel Vetter <[email protected]>Cc Greg Kroah-Hartman <[email protected]>Cc <[email protected]>Cc <[email protected]>Signed-off-by Ricardo B. Marliere <[email protected]>
Quoted 5 lines
---
Ricardo B. Marliere (2):
drm: display: makedp_aux_bus_typeconst
drm: mipi-dsi: makemipi_dsi_bus_typeconst
Dmitry Baryshkov
AppliedQuoted 5 lines · Ricardo B. Marliere
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].
Applied to drm-misc-next, thanks!
[1/2] drm: display: make dp_aux_bus_type const
commit: 78cb1f1d19b600ed288ed7ad1fd7b9378302cbc5
[2/2] drm: mipi-dsi: make mipi_dsi_bus_type const
commit: 2c8ba564a42c7418a726367c73d7c88454848fdcBest regards,
Signature · 1 line
Dmitry Baryshkov <[email protected]>