diff options
author | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-05-10 09:53:11 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2024-05-10 09:53:11 +0200 |
commit | 9a8482387f4dc17a8f79e46004de1bee95c5e3dd (patch) | |
tree | f2ab1c4aa0e347bc803664620ff6493d393bb38e | |
parent | 48259b90973718d2277db27b5e510f0fe957eaa0 (diff) | |
parent | 33108abc0e22f6f5d1209f4ba2b53cc94328f633 (diff) | |
download | lwn-9a8482387f4dc17a8f79e46004de1bee95c5e3dd.tar.gz lwn-9a8482387f4dc17a8f79e46004de1bee95c5e3dd.zip |
Merge tag 'media-fixes-unicam-20240510' of https://git.kernel.org/pub/scm/linux/kernel/git/pinchartl/linux into media_stage
bcm2835-unicam fixes for v6.10
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://patchwork.linuxtv.org/project/linux-media/patch/20240509222123.GA21033@pendragon.ideasonboard.com/
-rw-r--r-- | MAINTAINERS | 2 | ||||
-rw-r--r-- | drivers/media/platform/broadcom/bcm2835-unicam.c | 16 |
2 files changed, 6 insertions, 12 deletions
diff --git a/MAINTAINERS b/MAINTAINERS index 01b86927a7ad..ef6be9d95143 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -4039,7 +4039,7 @@ M: Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com> L: linux-media@vger.kernel.org S: Maintained F: Documentation/devicetree/bindings/media/brcm,bcm2835-unicam.yaml -F: drivers/media/platform/bcm2835/ +F: drivers/media/platform/broadcom/bcm2835-unicam* BROADCOM BCM47XX MIPS ARCHITECTURE M: Hauke Mehrtens <hauke@hauke-m.de> diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c index 3c7878d8d79b..a1d93c14553d 100644 --- a/drivers/media/platform/broadcom/bcm2835-unicam.c +++ b/drivers/media/platform/broadcom/bcm2835-unicam.c @@ -2433,9 +2433,9 @@ static int unicam_async_bound(struct v4l2_async_notifier *notifier, return ret; source = media_pad_remote_pad_unique(sink); - if (!source) { + if (IS_ERR(source)) { dev_err(unicam->dev, "No connected sensor pad\n"); - return -ENOTCONN; + return PTR_ERR(source); } unicam->sensor.subdev = subdev; @@ -2661,17 +2661,13 @@ static int unicam_probe(struct platform_device *pdev) } ret = platform_get_irq(pdev, 0); - if (ret <= 0) { - dev_err(&pdev->dev, "No IRQ resource\n"); - ret = -EINVAL; + if (ret < 0) goto err_unicam_put; - } ret = devm_request_irq(&pdev->dev, ret, unicam_isr, 0, "unicam_capture0", unicam); if (ret) { dev_err(&pdev->dev, "Unable to request interrupt\n"); - ret = -EINVAL; goto err_unicam_put; } @@ -2704,7 +2700,7 @@ err_unicam_put: return ret; } -static int unicam_remove(struct platform_device *pdev) +static void unicam_remove(struct platform_device *pdev) { struct unicam_device *unicam = platform_get_drvdata(pdev); @@ -2718,8 +2714,6 @@ static int unicam_remove(struct platform_device *pdev) unicam_put(unicam); pm_runtime_disable(&pdev->dev); - - return 0; } static const struct of_device_id unicam_of_match[] = { @@ -2730,7 +2724,7 @@ MODULE_DEVICE_TABLE(of, unicam_of_match); static struct platform_driver unicam_driver = { .probe = unicam_probe, - .remove = unicam_remove, + .remove_new = unicam_remove, .driver = { .name = UNICAM_MODULE_NAME, .pm = pm_ptr(&unicam_pm_ops), |