Skip to content

Set sub-device owner field

Sakari Ailus linux-media 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2media: v4l: Set sub-device's owner field to the caller's moduledrivers/media/v4l2-core/v4l2-async.c drivers/media/v4l2-core/v4l2-device.c drivers/media/v4l2-core/v4l2-i2c.c +2 more+15 -100 replies
2/2media: v4l: async: Set owner for async sub-devicesdrivers/media/v4l2-core/v4l2-async.c include/media/v4l2-async.h+9 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] Set sub-device owner field

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(-)
Signature · 1 line
2.39.2