diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2022-01-22 11:31:37 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-04-24 08:05:53 +0100 |
commit | cef699749f3789add5ecaf0a2f73a659cae1c7ae (patch) | |
tree | cf4c68f42642659a7ab906af3202440acd555ff0 /drivers/media/mc | |
parent | 78a171e58717685ea0eb082a24bc75bd9e20518f (diff) | |
download | lwn-cef699749f3789add5ecaf0a2f73a659cae1c7ae.tar.gz lwn-cef699749f3789add5ecaf0a2f73a659cae1c7ae.zip |
media: mc: Set bus_info in media_device_init()
Set bus_info field based on struct device in media_device_init() and
remove corresponding code from drivers.
Also update media_device_init() documentation: the dev field must be now
initialised before calling it.
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Diffstat (limited to 'drivers/media/mc')
-rw-r--r-- | drivers/media/mc/mc-device.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c index 094647fdb866..824d89b325a6 100644 --- a/drivers/media/mc/mc-device.c +++ b/drivers/media/mc/mc-device.c @@ -700,6 +700,10 @@ void media_device_init(struct media_device *mdev) atomic_set(&mdev->request_id, 0); + if (!*mdev->bus_info) + media_set_bus_info(mdev->bus_info, sizeof(mdev->bus_info), + mdev->dev); + dev_dbg(mdev->dev, "Media device initialized\n"); } EXPORT_SYMBOL_GPL(media_device_init); |