diff options
| author | Kory Maincent (TI.com) <kory.maincent@bootlin.com> | 2026-01-23 19:12:32 +0300 |
|---|---|---|
| committer | Luca Ceresoli <luca.ceresoli@bootlin.com> | 2026-02-11 11:16:15 +0300 |
| commit | 87e66f60f63a746094134bc3e0ffdb6bd87afcb1 (patch) | |
| tree | 0c8f28c52e2cd00915cd1456ac090e52cf672cfd | |
| parent | 8fcc0eb34d79d2733ce617073a4c52b42ffeb00f (diff) | |
| download | linux-87e66f60f63a746094134bc3e0ffdb6bd87afcb1.tar.xz | |
drm/tilcdc: Use drm_module_platform_driver() helper
Use the drm_module_platform_driver() helper macro to simplify driver
registration. This macro handles both the platform driver registration
and the drm_firmware_drivers_only() check, making the custom init/exit
functions unnecessary.
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Kory Maincent (TI.com) <kory.maincent@bootlin.com>
Link: https://patch.msgid.link/20260123-feature_tilcdc-v5-14-5a44d2aa3f6f@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
| -rw-r--r-- | drivers/gpu/drm/tilcdc/tilcdc_drv.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index 20f93240b335..97380b623fca 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -20,6 +20,7 @@ #include <drm/drm_gem_dma_helper.h> #include <drm/drm_gem_framebuffer_helper.h> #include <drm/drm_mm.h> +#include <drm/drm_module.h> #include <drm/drm_probe_helper.h> #include <drm/drm_vblank.h> @@ -532,23 +533,7 @@ static struct platform_driver tilcdc_platform_driver = { }, }; -static int __init tilcdc_drm_init(void) -{ - if (drm_firmware_drivers_only()) - return -ENODEV; - - DBG("init"); - return platform_driver_register(&tilcdc_platform_driver); -} - -static void __exit tilcdc_drm_fini(void) -{ - DBG("fini"); - platform_driver_unregister(&tilcdc_platform_driver); -} - -module_init(tilcdc_drm_init); -module_exit(tilcdc_drm_fini); +drm_module_platform_driver(tilcdc_platform_driver); MODULE_AUTHOR("Rob Clark <robdclark@gmail.com"); MODULE_DESCRIPTION("TI LCD Controller DRM Driver"); |
