[PATCH 19/26] media: Add nop implementations of media_device_{init,cleanup}

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To support compliation with Media controller disabled, drivers were
required to conditionally call media_device_init and media_device_cleanup.
Add nop implementations of both so drivers don't need to care (or at least
care less).

Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
---
 include/media/media-device.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/include/media/media-device.h b/include/media/media-device.h
index 7e8bca6756ba..780440bbb39d 100644
--- a/include/media/media-device.h
+++ b/include/media/media-device.h
@@ -460,6 +460,11 @@ void __media_device_usb_init(struct media_device *mdev,
 #else
 #define media_device_get(mdev) do { } while (0)
 #define media_device_put(mdev) do { } while (0)
+
+static inline void media_device_init(struct media_device *mdev)
+{
+}
+
 static inline int media_device_register(struct media_device *mdev)
 {
 	return 0;
@@ -467,6 +472,11 @@ static inline int media_device_register(struct media_device *mdev)
 static inline void media_device_unregister(struct media_device *mdev)
 {
 }
+
+static inline void media_device_cleanup(struct media_device *mdev)
+{
+}
+
 static inline int media_device_register_entity(struct media_device *mdev,
 						struct media_entity *entity)
 {
-- 
2.30.2




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux