2024-04-30 21:32:38

by Laurent Pinchart

[permalink] [raw]
Subject: [PATCH 0/2] media: bcm2835-unicam: Fix compilation errors and warnings

Hello,

This small patch series fixes two compilation issues reported by the
kernel test robot ([1]) in the newly merged Unicam driver. The fixes are
meant for v6.10.

[1] https://lore.kernel.org/linux-media/[email protected]/

Laurent Pinchart (2):
media: bcm2835-unicam: Drop usage of of_match_ptr()
media: bcm2835-unicam: Include v4l2-subdev.h

drivers/media/platform/broadcom/bcm2835-unicam.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)


base-commit: a1c6d22421501fc1016b99ac8570a1030714c70f
--
Regards,

Laurent Pinchart



2024-04-30 21:39:12

by Laurent Pinchart

[permalink] [raw]
Subject: [PATCH 1/2] media: bcm2835-unicam: Drop usage of of_match_ptr()

Using of_match_ptr() to set the .of_match_table field of the device
driver results in the unicam_of_match table being unused on non-OF
platforms, causing a compilation warning. Fix it by dropping usage of
of_match_ptr(), which can be done because the .of_match_table field is
part of the device_driver structure regardless of whether or not
CONFIG_OF is selected.

Signed-off-by: Laurent Pinchart <[email protected]>
Reported-by: kernel test robot <[email protected]>
Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/
---
drivers/media/platform/broadcom/bcm2835-unicam.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c
index bd2bbb53070e..c590e26fe2cf 100644
--- a/drivers/media/platform/broadcom/bcm2835-unicam.c
+++ b/drivers/media/platform/broadcom/bcm2835-unicam.c
@@ -2733,7 +2733,7 @@ static struct platform_driver unicam_driver = {
.driver = {
.name = UNICAM_MODULE_NAME,
.pm = pm_ptr(&unicam_pm_ops),
- .of_match_table = of_match_ptr(unicam_of_match),
+ .of_match_table = unicam_of_match,
},
};

--
Regards,

Laurent Pinchart