mbox series

[0/2] Set sub-device owner field

Message ID 20240315072935.275458-1-sakari.ailus@linux.intel.com (mailing list archive)
Headers show
Series Set sub-device owner field | expand

Message

Sakari Ailus March 15, 2024, 7:29 a.m. UTC
Hi folks,

This set makes v4l2_device_register_subdev() and
v4l2_async_register_subdev() macros and prefixes the similarly named
functions with "__". The macro is used to obtain THIS_MODULE pointer that
is then passed to the function, in order to set the owner field of the
sub-device.

Drivers often miss this and one could ask why should the drivers do this
on their own. So instead do it consistently for all callers.

Sakari Ailus (2):
  media: v4l: Set sub-device's owner field to the caller's module
  media: v4l: async: Set owner for async sub-devices

 drivers/media/v4l2-core/v4l2-async.c  | 10 +++++++---
 drivers/media/v4l2-core/v4l2-device.c | 12 +++++++-----
 drivers/media/v4l2-core/v4l2-i2c.c    |  2 +-
 drivers/media/v4l2-core/v4l2-spi.c    |  2 +-
 include/media/v4l2-async.h            |  4 +++-
 include/media/v4l2-device.h           |  7 +++++--
 6 files changed, 24 insertions(+), 13 deletions(-)