summaryrefslogtreecommitdiff
path: root/drivers/media/platform/marvell-ccic/mcam-core.c
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2021-01-18 02:52:51 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-02-06 08:44:00 +0100
commit50fe0de0fedbc259eb79951f6912b78795dcaeaa (patch)
tree8b2458213d9169005e121bed9cfa81f6c864636f /drivers/media/platform/marvell-ccic/mcam-core.c
parent88367b1522bf7e777ed86bb9396c645296ee4ecc (diff)
media: marvell-ccic: Use v4l2_async_notifier_add_*_subdev
The use of v4l2_async_notifier_add_subdev will be discouraged. Drivers are instead encouraged to use a helper such as v4l2_async_notifier_add_fwnode_remote_subdev. This fixes a misuse of the API, as v4l2_async_notifier_add_subdev should get a kmalloc'ed struct v4l2_async_subdev, removing some boilerplate code while at it. Use the appropriate helper: v4l2_async_notifier_add_i2c_subdev or v4l2_async_notifier_add_fwnode_remote_subdev, which handles the needed setup, instead of open-coding it. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org> Reviewed-by: Helen Koike <helen.koike@collabora.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/marvell-ccic/mcam-core.c')
-rw-r--r--drivers/media/platform/marvell-ccic/mcam-core.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/media/platform/marvell-ccic/mcam-core.c b/drivers/media/platform/marvell-ccic/mcam-core.c
index c012fd2e1d29..153277e4fe80 100644
--- a/drivers/media/platform/marvell-ccic/mcam-core.c
+++ b/drivers/media/platform/marvell-ccic/mcam-core.c
@@ -1866,16 +1866,6 @@ int mccic_register(struct mcam_camera *cam)
cam->pix_format = mcam_def_pix_format;
cam->mbus_code = mcam_def_mbus_code;
- /*
- * Register sensor notifier.
- */
- v4l2_async_notifier_init(&cam->notifier);
- ret = v4l2_async_notifier_add_subdev(&cam->notifier, &cam->asd);
- if (ret) {
- cam_warn(cam, "failed to add subdev to a notifier");
- goto out;
- }
-
cam->notifier.ops = &mccic_notify_ops;
ret = v4l2_async_notifier_register(&cam->v4l2_dev, &cam->notifier);
if (ret < 0) {