linux_dsm_epyc7002/drivers/media/platform/soc_camera
Wolfram Sang e920ebc2f8 [media] soc_camera: cleanup control device on async_unbind
I got the following WARN on a simple unbind/bind cycle:

root@Lager:/sys/bus/i2c/drivers/adv7180# echo 6-0020 > unbind
root@Lager:/sys/bus/i2c/drivers/adv7180# echo 6-0020 > bind
[   31.097652] adv7180 6-0020: chip found @ 0x20 (e6520000.i2c)
[   31.123744] ------------[ cut here ]------------
[   31.128413] WARNING: CPU: 3 PID: 873 at drivers/media/platform/soc_camera/soc_camera.c:1463 soc_camera_async_bound+0x40/0xa0()
[   31.139896] CPU: 3 PID: 873 Comm: sh Not tainted 4.4.0-rc3-00062-ge8ae2c0b6bca2a #172
[   31.147815] Hardware name: Generic R8A7790 (Flattened Device Tree)
[   31.154056] Backtrace:
[   31.156575] [<c0014bc0>] (dump_backtrace) from [<c0014d80>] (show_stack+0x20/0x24)
[   31.164233]  r6:c05c5b33 r5:00000009 r4:00000000 r3:00404100
[   31.170017] [<c0014d60>] (show_stack) from [<c01e2344>] (dump_stack+0x78/0x94)
[   31.177344] [<c01e22cc>] (dump_stack) from [<c0029e7c>] (warn_slowpath_common+0x98/0xc4)
[   31.185518]  r4:00000000 r3:00000000
[   31.189172] [<c0029de4>] (warn_slowpath_common) from [<c0029fa0>] (warn_slowpath_null+0x2c/0x34)
[   31.198043]  r8:eb38df28 r7:eb38c5d0 r6:eb38de80 r5:e6962810 r4:eb38de80
[   31.204898] [<c0029f74>] (warn_slowpath_null) from [<c0356348>] (soc_camera_async_bound+0x40/0xa0)
[   31.213955] [<c0356308>] (soc_camera_async_bound) from [<c03499a0>] (v4l2_async_test_notify+0x9c/0x108)
[   31.223430]  r5:eb38c5ec r4:eb38de80
[   31.227084] [<c0349904>] (v4l2_async_test_notify) from [<c0349dd8>] (v4l2_async_register_subdev+0x88/0xd0)
[   31.236822]  r7:c07115c8 r6:c071160c r5:eb38c5ec r4:eb38de80
[   31.242622] [<c0349d50>] (v4l2_async_register_subdev) from [<c0337040>] (adv7180_probe+0x2c8/0x3a4)
[   31.251753]  r8:00000000 r7:00000001 r6:eb38de80 r5:ea973400 r4:eb38de10 r3:00000000
[   31.259660] [<c0336d78>] (adv7180_probe) from [<c032dd80>] (i2c_device_probe+0x1a0/0x1e4)

This gets fixed by clearing the control device pointer on async_unbind.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
2016-01-25 08:54:39 -02:00
..
atmel-isi.c [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
atmel-isi.h [media] atmel-isi: add code to setup correct resolution for preview path 2015-11-17 15:29:39 -02:00
Kconfig [media] disable COMPILE_TEST for omap1_camera 2014-09-09 18:07:39 -03:00
Makefile [media] media: mx1_camera: Remove driver 2014-06-17 12:04:53 -03:00
mx2_camera.c [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
mx3_camera.c [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
omap1_camera.c [media] include/media: move platform_data to linux/platform_data/media 2015-11-17 06:58:42 -02:00
pxa_camera.c [media] move media platform data to linux/platform_data/media 2015-11-19 08:09:38 -02:00
rcar_vin.c [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
sh_mobile_ceu_camera.c [media] media: videobuf2: Move timestamp to vb2_buffer 2015-12-18 13:53:31 -02:00
sh_mobile_csi2.c [media] include/media: move driver interface headers to a separate dir 2015-11-17 06:57:29 -02:00
soc_camera_platform.c [media] include/media: move platform_data to linux/platform_data/media 2015-11-17 06:58:42 -02:00
soc_camera.c [media] soc_camera: cleanup control device on async_unbind 2016-01-25 08:54:39 -02:00
soc_mediabus.c [media] include/media: move driver interface headers to a separate dir 2015-11-17 06:57:29 -02:00
soc_scale_crop.c [media] v4l2: replace s_mbus_fmt by set_fmt in bridge drivers 2015-05-01 09:01:16 -03:00
soc_scale_crop.h [media] V4L2: soc-camera: move generic functions into a separate file 2013-06-28 15:03:16 -03:00