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

[media] media: remove obsolete Media Device Managed resource interfaces

Remove obsolete media_device_get_devres(), media_device_find_devres(),
and media_device_release_devres() interfaces. These interfaces are now
obsolete.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>

authored by

Shuah Khan and committed by
Mauro Carvalho Chehab
8c2ebcf1 8b0041db

-58
-26
drivers/media/media-device.c
··· 821 821 } 822 822 EXPORT_SYMBOL_GPL(media_device_unregister); 823 823 824 - static void media_device_release_devres(struct device *dev, void *res) 825 - { 826 - } 827 - 828 - struct media_device *media_device_get_devres(struct device *dev) 829 - { 830 - struct media_device *mdev; 831 - 832 - mdev = devres_find(dev, media_device_release_devres, NULL, NULL); 833 - if (mdev) 834 - return mdev; 835 - 836 - mdev = devres_alloc(media_device_release_devres, 837 - sizeof(struct media_device), GFP_KERNEL); 838 - if (!mdev) 839 - return NULL; 840 - return devres_get(dev, mdev, NULL, NULL); 841 - } 842 - EXPORT_SYMBOL_GPL(media_device_get_devres); 843 - 844 - struct media_device *media_device_find_devres(struct device *dev) 845 - { 846 - return devres_find(dev, media_device_release_devres, NULL, NULL); 847 - } 848 - EXPORT_SYMBOL_GPL(media_device_find_devres); 849 - 850 824 #if IS_ENABLED(CONFIG_PCI) 851 825 void media_device_pci_init(struct media_device *mdev, 852 826 struct pci_dev *pci_dev,
-32
include/media/media-device.h
··· 375 375 void media_device_unregister_entity_notify(struct media_device *mdev, 376 376 struct media_entity_notify *nptr); 377 377 378 - /** 379 - * media_device_get_devres() - get media device as device resource 380 - * creates if one doesn't exist 381 - * 382 - * @dev: pointer to struct &device. 383 - * 384 - * Sometimes, the media controller &media_device needs to be shared by more 385 - * than one driver. This function adds support for that, by dynamically 386 - * allocating the &media_device and allowing it to be obtained from the 387 - * struct &device associated with the common device where all sub-device 388 - * components belong. So, for example, on an USB device with multiple 389 - * interfaces, each interface may be handled by a separate per-interface 390 - * drivers. While each interface have its own &device, they all share a 391 - * common &device associated with the hole USB device. 392 - */ 393 - struct media_device *media_device_get_devres(struct device *dev); 394 - 395 - /** 396 - * media_device_find_devres() - find media device as device resource 397 - * 398 - * @dev: pointer to struct &device. 399 - */ 400 - struct media_device *media_device_find_devres(struct device *dev); 401 - 402 378 /* Iterate over all entities. */ 403 379 #define media_device_for_each_entity(entity, mdev) \ 404 380 list_for_each_entry(entity, &(mdev)->entities, graph_obj.list) ··· 451 475 struct media_device *mdev, 452 476 struct media_entity_notify *nptr) 453 477 { 454 - } 455 - static inline struct media_device *media_device_get_devres(struct device *dev) 456 - { 457 - return NULL; 458 - } 459 - static inline struct media_device *media_device_find_devres(struct device *dev) 460 - { 461 - return NULL; 462 478 } 463 479 464 480 static inline void media_device_pci_init(struct media_device *mdev,