mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
media: v4l: Set sub-device's owner field to the caller's module
Set a sub-device's owner field to the caller's module, provided as an argument to the function. v4l2_device_register_subdev() becomes a macro passing THIS_MODULE to the __v4l2_device_register_subdev() function. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
This commit is contained in:
@@ -59,7 +59,7 @@ struct v4l2_subdev *v4l2_spi_new_subdev(struct v4l2_device *v4l2_dev,
|
||||
* Register with the v4l2_device which increases the module's
|
||||
* use count as well.
|
||||
*/
|
||||
if (v4l2_device_register_subdev(v4l2_dev, sd))
|
||||
if (__v4l2_device_register_subdev(v4l2_dev, sd, sd->owner))
|
||||
sd = NULL;
|
||||
|
||||
/* Decrease the module use count to match the first try_module_get. */
|
||||
|
Reference in New Issue
Block a user