diff options
author | Jean-Francois Moine <moinejf@free.fr> | 2009-07-28 09:38:25 +0200 |
---|---|---|
committer | Jean-Francois Moine <moinejf@free.fr> | 2009-07-28 09:38:25 +0200 |
commit | f36217342b748f16badc1abb3aaeb433ee088020 (patch) | |
tree | 038dceacc9a3c1e9daf226dd8b2da2b41bc9487f /linux/drivers | |
parent | bf8e2366acf0eddbefdabe74b14e0b3634fcd669 (diff) | |
download | mediapointer-dvb-s2-f36217342b748f16badc1abb3aaeb433ee088020.tar.gz mediapointer-dvb-s2-f36217342b748f16badc1abb3aaeb433ee088020.tar.bz2 |
gspca - main: Memorize the current alt before setting it.
From: Jean-Francois Moine <moinejf@free.fr>
This prevents a loop if a permanent error occurs in usb_set_interface().
Priority: normal
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/video/gspca/gspca.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/linux/drivers/media/video/gspca/gspca.c b/linux/drivers/media/video/gspca/gspca.c index eedf9a60c..2e5197073 100644 --- a/linux/drivers/media/video/gspca/gspca.c +++ b/linux/drivers/media/video/gspca/gspca.c @@ -498,6 +498,7 @@ static struct usb_host_endpoint *get_ep(struct gspca_dev *gspca_dev) } PDEBUG(D_STREAM, "use alt %d ep 0x%02x", i, ep->desc.bEndpointAddress); + gspca_dev->alt = i; /* memorize the current alt setting */ if (gspca_dev->nbalt > 1) { ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, i); if (ret < 0) { @@ -505,7 +506,6 @@ static struct usb_host_endpoint *get_ep(struct gspca_dev *gspca_dev) return NULL; } } - gspca_dev->alt = i; /* memorize the current alt setting */ return ep; } |