Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: mc: Add nop implementations of media_device_{init,cleanup}

To support compilation 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@linux.intel.com>
Acked-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Sakari Ailus and committed by
Hans Verkuil
7cb8a625 a069f79b

+6
+6
include/media/media-device.h
··· 429 429 const char *driver_name); 430 430 431 431 #else 432 + static inline void media_device_init(struct media_device *mdev) 433 + { 434 + } 432 435 static inline int media_device_register(struct media_device *mdev) 433 436 { 434 437 return 0; 435 438 } 436 439 static inline void media_device_unregister(struct media_device *mdev) 440 + { 441 + } 442 + static inline void media_device_cleanup(struct media_device *mdev) 437 443 { 438 444 } 439 445 static inline int media_device_register_entity(struct media_device *mdev,