diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2013-12-12 16:38:17 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-13 18:39:00 +0200 |
commit | 85de721c46ba8ad9b283b2b3e307c9a3e8425042 (patch) | |
tree | fd49693fa164755b123d15636a10d3ee3d949d85 /include/media/media-device.h | |
parent | [media] v4l: Check pad arguments for [gs]_frame_interval (diff) | |
download | linux-85de721c46ba8ad9b283b2b3e307c9a3e8425042.tar.xz linux-85de721c46ba8ad9b283b2b3e307c9a3e8425042.zip |
[media] media: Use a better owner for the media device
mdev->fops->owner is actually the owner of the very same module which
implements media_device_register(), so it can't be unloaded anyway. Instead,
use THIS_MODULE through a macro as does video_register_device().
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'include/media/media-device.h')
-rw-r--r-- | include/media/media-device.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/media/media-device.h b/include/media/media-device.h index 12155a9596c4..6e6db78f1ee2 100644 --- a/include/media/media-device.h +++ b/include/media/media-device.h @@ -87,7 +87,9 @@ struct media_device { /* media_devnode to media_device */ #define to_media_device(node) container_of(node, struct media_device, devnode) -int __must_check media_device_register(struct media_device *mdev); +int __must_check __media_device_register(struct media_device *mdev, + struct module *owner); +#define media_device_register(mdev) __media_device_register(mdev, THIS_MODULE) void media_device_unregister(struct media_device *mdev); int __must_check media_device_register_entity(struct media_device *mdev, |