]> git.baikalelectronics.ru Git - kernel.git/commit
media: uvcvideo: Store device information pointer in struct uvc_device
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Fri, 17 Aug 2018 08:50:02 +0000 (04:50 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Tue, 11 Sep 2018 12:47:05 +0000 (08:47 -0400)
commit744acde2a4143154bb190a113fa016782fb454be
treed14d003233c851dd0d91bbfa6f4cf1a04e5a9581
parent7647704f4111125739952173418511a9e7cf739d
media: uvcvideo: Store device information pointer in struct uvc_device

The device information structure is currently copied field by field in
the uvc_device structure. As we only have two fields at the moment this
isn't much of an issue, but it prevents easy addition of new info
fields.

Fix this by storing the uvc_device_info pointer in the uvc_device
structure. As a result the uvc_device meta_format field can be removed.
The quirks field, however, needs to stay as it can be modified through a
module parameter.

As not all device have an information structure, we declare a global
"NULL" info instance that is used as a fallback when the driver_info is
empty.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/usb/uvc/uvc_driver.c
drivers/media/usb/uvc/uvc_metadata.c
drivers/media/usb/uvc/uvcvideo.h