Server IP : 13.213.54.232 / Your IP : 216.73.216.72 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ip-172-31-17-110 6.8.0-1029-aws #31~22.04.1-Ubuntu SMP Thu Apr 24 21:16:18 UTC 2025 x86_64 User : www-data ( 33) PHP Version : 7.1.33-67+ubuntu22.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/modules/6.8.0-1029-aws/build/include/media/ |
Upload File : |
/* SPDX-License-Identifier: GPL-2.0+ */ /* * media-dev-allocator.h - Media Controller Device Allocator API * * Copyright (c) 2019 Shuah Khan <shuah@kernel.org> * * Credits: Suggested by Laurent Pinchart <laurent.pinchart@ideasonboard.com> */ /* * This file adds a global ref-counted Media Controller Device Instance API. * A system wide global media device list is managed and each media device * includes a kref count. The last put on the media device releases the media * device instance. */ #ifndef _MEDIA_DEV_ALLOCATOR_H #define _MEDIA_DEV_ALLOCATOR_H struct usb_device; #if defined(CONFIG_MEDIA_CONTROLLER) && IS_ENABLED(CONFIG_USB) /** * media_device_usb_allocate() - Allocate and return struct &media device * * @udev: struct &usb_device pointer * @module_name: should be filled with %KBUILD_MODNAME * @owner: struct module pointer %THIS_MODULE for the driver. * %THIS_MODULE is null for a built-in driver. * It is safe even when %THIS_MODULE is null. * * This interface should be called to allocate a Media Device when multiple * drivers share usb_device and the media device. This interface allocates * &media_device structure and calls media_device_usb_init() to initialize * it. * */ struct media_device *media_device_usb_allocate(struct usb_device *udev, const char *module_name, struct module *owner); /** * media_device_delete() - Release media device. Calls kref_put(). * * @mdev: struct &media_device pointer * @module_name: should be filled with %KBUILD_MODNAME * @owner: struct module pointer %THIS_MODULE for the driver. * %THIS_MODULE is null for a built-in driver. * It is safe even when %THIS_MODULE is null. * * This interface should be called to put Media Device Instance kref. */ void media_device_delete(struct media_device *mdev, const char *module_name, struct module *owner); #else static inline struct media_device *media_device_usb_allocate( struct usb_device *udev, const char *module_name, struct module *owner) { return NULL; } static inline void media_device_delete( struct media_device *mdev, const char *module_name, struct module *owner) { } #endif /* CONFIG_MEDIA_CONTROLLER && CONFIG_USB */ #endif /* _MEDIA_DEV_ALLOCATOR_H */