media: st-mipid02: Use v4l2_async_notifier_add_fwnode_remote_subdev
authorEzequiel Garcia <ezequiel@collabora.com>
Mon, 18 Jan 2021 01:52:49 +0000 (02:52 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 6 Feb 2021 07:43:02 +0000 (08:43 +0100)
commit5bbefdefe8a6927e0cdf68bf02f677e06ccc32b6
tree4496152ad583489602053a7ec4a72b9d7f0dab5b
parent3a2822bfe45c50abd9f76a8547a77a1f6a0e8c8d
media: st-mipid02: Use v4l2_async_notifier_add_fwnode_remote_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_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>
drivers/media/i2c/st-mipid02.c