summaryrefslogtreecommitdiffstats
path: root/include/media/media-device.h
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-11 14:24:23 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-02-16 08:41:10 -0200
commitbb07bd6b6851120ac9b25bb315d62d9782d2c345 (patch)
treeb40e2ae528e4c5427d62c0ce45697dce3e2a5365 /include/media/media-device.h
parentc73bbaa4ec3eb225ffe468f80d45724d0496bf03 (diff)
downloadlinux-bb07bd6b6851120ac9b25bb315d62d9782d2c345.tar.gz
linux-bb07bd6b6851120ac9b25bb315d62d9782d2c345.tar.bz2
linux-bb07bd6b6851120ac9b25bb315d62d9782d2c345.zip
[media] allow overriding the driver name
On USB drivers, the dev struct is usually filled with the USB device. That would mean that the name of the driver specified by media_device.dev.driver.name would be "usb", instead of the name of the actual driver that created the media entity. Add an optional field at the internal struct to allow drivers to override the driver name. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media/media-device.h')
-rw-r--r--include/media/media-device.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/media/media-device.h b/include/media/media-device.h
index d3855898c3fc..165451bc3985 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -268,6 +268,10 @@ struct device;
* struct media_device - Media device
* @dev: Parent device
* @devnode: Media device node
+ * @driver_name: Optional device driver name. If not set, calls to
+ * %MEDIA_IOC_DEVICE_INFO will return dev->driver->name.
+ * This is needed for USB drivers for example, as otherwise
+ * they'll all appear as if the driver name was "usb".
* @model: Device model name
* @serial: Device serial number (optional)
* @bus_info: Unique and stable device location identifier
@@ -303,6 +307,7 @@ struct media_device {
struct media_devnode devnode;
char model[32];
+ char driver_name[32];
char serial[40];
char bus_info[32];
u32 hw_revision;