mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 23:22:31 +02:00
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>
This commit is contained in:
parent
8fcc0eb34d
commit
87e66f60f6
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user