diff options
author | Sakari Ailus <sakari.ailus@linux.intel.com> | 2023-04-17 12:29:59 +0300 |
---|---|---|
committer | Hans Verkuil <hverkuil-cisco@xs4all.nl> | 2023-05-25 17:21:22 +0300 |
commit | 25857a007d521acee63012876ba00d94112c2ba3 (patch) | |
tree | d03778f51a0dd53ff99dc7070c1cb482a3398707 /drivers/media/pci | |
parent | 950e9a295b984b011bcbfb90af167e4e20a077f3 (diff) | |
download | linux-25857a007d521acee63012876ba00d94112c2ba3.tar.xz |
media: ipu3-cio2: Fix container_of() macro wrapper arguments
The argument of the to_sensor_asd() is called the same as the field name
for the container_of() macro, so it only works if the argument name is
"asd". Fix it.
Also switch to container_of_const().
Reviewed-by: Bingbu Cao <bingbu.cao@intel.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/pci')
-rw-r--r-- | drivers/media/pci/intel/ipu3/ipu3-cio2-main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c index 2c9d035255d6..34984a7474ed 100644 --- a/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c +++ b/drivers/media/pci/intel/ipu3/ipu3-cio2-main.c @@ -1375,7 +1375,8 @@ struct sensor_async_subdev { struct csi2_bus_info csi2; }; -#define to_sensor_asd(asd) container_of(asd, struct sensor_async_subdev, asd) +#define to_sensor_asd(__asd) \ + container_of_const(__asd, struct sensor_async_subdev, asd) /* The .bound() notifier callback when a match is found */ static int cio2_notifier_bound(struct v4l2_async_notifier *notifier, |