diff options
author | Hans de Goede <hdegoede@redhat.com> | 2010-01-07 12:04:04 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-02-26 15:10:39 -0300 |
commit | ab269d300ef9fe7e2f60613d0ac160e12b84658e (patch) | |
tree | 9c26012bbf9294282d366e51da9d0ed01da6b88d /drivers/media/video | |
parent | 9336960d075839b41bef89a0c68899c4025e8289 (diff) |
V4L/DVB (13994): gscpa_stv0680: Fix camera initialization on hotplug
stv0680 cameras currently only work when already plugged in when the system
boots (or when manually re-loading the driver after boot). This patch fixes
this.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/gspca/stv0680.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/gspca/stv0680.c b/drivers/media/video/gspca/stv0680.c index 856675e00e2..7312bf43113 100644 --- a/drivers/media/video/gspca/stv0680.c +++ b/drivers/media/video/gspca/stv0680.c @@ -138,6 +138,10 @@ static int sd_config(struct gspca_dev *gspca_dev, struct sd *sd = (struct sd *) gspca_dev; struct cam *cam = &gspca_dev->cam; + /* Give the camera some time to settle, otherwise initalization will + fail on hotplug, and yes it really needs a full second. */ + msleep(1000); + /* ping camera to be sure STV0680 is present */ if (stv_sndctrl(gspca_dev, 0, 0x88, 0x5678, 0x02) != 0x02 || gspca_dev->usb_buf[0] != 0x56 || gspca_dev->usb_buf[1] != 0x78) { |