linux/drivers/media
Niklas Söderlund 487cc85785 media: v4l: async: use the v4l2_dev from the root notifier when matching sub-devices
When matching and registering a sub-device from a sub-notifier use the
v4l2_device from the root parent notifier. Using the v4l2_dev stored in
the sub-notifier itself is incorrect as it might not be set.

This can be demonstrated by unbinding and rebinding the adv748x driver
and observing that it fails to probe due to the check !v4l2_dev in
v4l2_device_register_subdev().

    # echo 4-0070 > /sys/bus/i2c/drivers/adv748x/unbind
    # echo 4-0070 > /sys/bus/i2c/drivers/adv748x/bind
    adv748x 4-0070: chip found @ 0xe0 revision 2143
    adv748x 4-0070: Failed to probe TXA
    adv748x: probe of 4-0070 failed with error -22

Looking at the commit which adds sub-notifiers to V4L2 it looks like
this is the intended behavior of the original commit. With this fix the
adv748x can be re-bound and still function properly.

Fixes: 2cab00bb07 ("media: v4l: async: Allow binding notifiers to sub-devices")

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-11-30 04:44:07 -05:00
..
cec media updates for v4.15-rc1 2017-11-15 20:30:12 -08:00
common media: siano: get rid of documentation warnings 2017-11-27 08:40:36 -05:00
dvb-core media: dvb_net: stop abusing /** for comments 2017-11-27 10:35:34 -05:00
dvb-frontends media: dvb-frontends: complete kernel-doc markups 2017-11-30 04:19:05 -05:00
firewire
i2c media: et8ek8: select V4L2_FWNODE 2017-11-30 04:42:19 -05:00
mmc License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci media: drivers: remove "/**" from non-kernel-doc comments 2017-11-30 04:19:03 -05:00
platform media: drivers: remove "/**" from non-kernel-doc comments 2017-11-30 04:19:03 -05:00
radio media: radio-wl1273: fix a parameter name at kernel-doc macro 2017-11-30 04:19:01 -05:00
rc media: rc: partial revert of "media: rc: per-protocol repeat period" 2017-11-30 04:40:23 -05:00
spi
tuners media: mt2063: fix some kernel-doc warnings 2017-11-30 04:19:01 -05:00
usb media: dvb: i2c transfers over usb cannot be done from stack 2017-11-30 04:39:32 -05:00
v4l2-core media: v4l: async: use the v4l2_dev from the root notifier when matching sub-devices 2017-11-30 04:44:07 -05:00
Kconfig media: rc-core: do not depend on MEDIA_SUPPORT 2017-08-20 09:39:36 -04:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
media-device.c media: drop use of MEDIA_API_VERSION 2017-08-08 06:03:15 -04:00
media-devnode.c media: utilize new cdev_device_add helper function 2017-03-21 06:44:33 +01:00
media-entity.c [media] media: Check for active and has_no_links overrun 2017-10-04 17:16:14 -03:00