diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2022-01-22 12:31:37 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@kernel.org> | 2022-04-24 09:05:53 +0200 |
commit | cef699749f3789add5ecaf0a2f73a659cae1c7ae (patch) | |
tree | cf4c68f42642659a7ab906af3202440acd555ff0 /include/media/media-device.h | |
parent | media: mc: Provide a helper for setting bus_info field (diff) | |
download | linux-cef699749f3789add5ecaf0a2f73a659cae1c7ae.tar.xz linux-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 'include/media/media-device.h')
-rw-r--r-- | include/media/media-device.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/media/media-device.h b/include/media/media-device.h index f0baee6771ef..a10b30507524 100644 --- a/include/media/media-device.h +++ b/include/media/media-device.h @@ -225,6 +225,9 @@ static inline __must_check int media_entity_enum_init( * * - dev must point to the parent device * - model must be filled with the device model name + * + * The bus_info field is set by media_device_init() for PCI and platform devices + * if the field begins with '\0'. */ void media_device_init(struct media_device *mdev); @@ -249,9 +252,6 @@ void media_device_cleanup(struct media_device *mdev); * The caller is responsible for initializing the &media_device structure * before registration. The following fields of &media_device must be set: * - * - &media_device.dev must point to the parent device (usually a &pci_dev, - * &usb_interface or &platform_device instance). - * * - &media_device.model must be filled with the device model name as a * NUL-terminated UTF-8 string. The device/model revision must not be * stored in this field. |