diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-09-15 11:53:32 +0300 |
---|---|---|
committer | Geert Uytterhoeven <geert+renesas@glider.be> | 2023-10-16 12:47:45 +0300 |
commit | 901500a8ba5c8cf04f8ddc71d6d5c0b02a2c5cf1 (patch) | |
tree | 15311d0f59d01df5359b9b8b6d3d6e0566236f87 /drivers/gpu/drm/renesas/shmobile | |
parent | 95478b0828752d5b91fe5a94f44d5713e4980599 (diff) | |
download | linux-901500a8ba5c8cf04f8ddc71d6d5c0b02a2c5cf1.tar.xz |
drm: renesas: shmobile: Convert to use devm_request_irq()
Convert to managed IRQ handling, to simplify cleanup.
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/8d870bdc59dd5e2754542388a03095ea09c96297.1694767209.git.geert+renesas@glider.be
Diffstat (limited to 'drivers/gpu/drm/renesas/shmobile')
-rw-r--r-- | drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c index 399fedd42271..bf3a9c1db177 100644 --- a/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c +++ b/drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c @@ -196,7 +196,6 @@ static void shmob_drm_remove(struct platform_device *pdev) drm_dev_unregister(ddev); drm_kms_helper_poll_fini(ddev); - free_irq(sdev->irq, ddev); drm_dev_put(ddev); } @@ -277,8 +276,8 @@ static int shmob_drm_probe(struct platform_device *pdev) goto err_modeset_cleanup; sdev->irq = ret; - ret = request_irq(sdev->irq, shmob_drm_irq, 0, ddev->driver->name, - ddev); + ret = devm_request_irq(&pdev->dev, sdev->irq, shmob_drm_irq, 0, + ddev->driver->name, ddev); if (ret < 0) { dev_err(&pdev->dev, "failed to install IRQ handler\n"); goto err_modeset_cleanup; @@ -290,14 +289,12 @@ static int shmob_drm_probe(struct platform_device *pdev) */ ret = drm_dev_register(ddev, 0); if (ret < 0) - goto err_irq_uninstall; + goto err_modeset_cleanup; drm_fbdev_generic_setup(ddev, 16); return 0; -err_irq_uninstall: - free_irq(sdev->irq, ddev); err_modeset_cleanup: drm_kms_helper_poll_fini(ddev); err_free_drm_dev: |