]> git.baikalelectronics.ru Git - kernel.git/commit
[media] gspca: Call sd_stop0 on disconnect
authorHans de Goede <hdegoede@redhat.com>
Mon, 7 May 2012 09:25:30 +0000 (06:25 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 14 May 2012 12:32:18 +0000 (09:32 -0300)
commitd78b1d03a165f0042ddb8db7fb7a605284e3047e
tree4a21370c4c3827c9e1d06bcb1384ab08a355dab9
parent18b5f4fe7f9bfce4857dfed1bb174089b6fc3c5f
[media] gspca: Call sd_stop0 on disconnect

This is necessary to ensure that worker-threads accessing the device
are stopped before our disconnect handler returns.

This causes a problem with stream_off calling sd_stop0 a second time
when the device handle is closed. This is fixed by setting
gscpa_dev->streaming to 0 on disconnect.

Note that now stream_off will never be called on a disconnected device,
and the present check can thus be removed from stream_off.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/gspca.c