• Hans de Goede's avatar
    [media] gspca: Call sd_stop0 on disconnect · eb238732
    Hans de Goede authored
    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: default avatarHans de Goede <hdegoede@redhat.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
    eb238732
gspca.c 62.8 KB