summaryrefslogtreecommitdiff
path: root/include/media
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2013-12-12 12:38:17 -0300
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:55:15 +0900
commit082692401af11b6f8af20a1a9c5c0c2cdfc1f259 (patch)
tree92e4c0d10af5035c44db491f6b159702bb9a40bb /include/media
parentd9259d911c9402fd9de7b20bf081efbedd016b39 (diff)
downloadlinux-3.10-082692401af11b6f8af20a1a9c5c0c2cdfc1f259.tar.gz
linux-3.10-082692401af11b6f8af20a1a9c5c0c2cdfc1f259.tar.bz2
linux-3.10-082692401af11b6f8af20a1a9c5c0c2cdfc1f259.zip
upstream: [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')
-rw-r--r--include/media/media-device.h4
-rw-r--r--include/media/media-devnode.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/include/media/media-device.h b/include/media/media-device.h
index 12155a9596c..6e6db78f1ee 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,
diff --git a/include/media/media-devnode.h b/include/media/media-devnode.h
index 3446af279fc..0dc7060f962 100644
--- a/include/media/media-devnode.h
+++ b/include/media/media-devnode.h
@@ -82,7 +82,8 @@ struct media_devnode {
/* dev to media_devnode */
#define to_media_devnode(cd) container_of(cd, struct media_devnode, dev)
-int __must_check media_devnode_register(struct media_devnode *mdev);
+int __must_check media_devnode_register(struct media_devnode *mdev,
+ struct module *owner);
void media_devnode_unregister(struct media_devnode *mdev);
static inline struct media_devnode *media_devnode_data(struct file *filp)