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)
commit3a03284dd4e7a9923acda7d73ec418378d3af6cc
treed14d003233c851dd0d91bbfa6f4cf1a04e5a9581
parent88d8034c943fb5a0e3c49eb878a87edcb376e2c2
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