summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-07-28 09:38:25 +0200
committerJean-Francois Moine <moinejf@free.fr>2009-07-28 09:38:25 +0200
commitf36217342b748f16badc1abb3aaeb433ee088020 (patch)
tree038dceacc9a3c1e9daf226dd8b2da2b41bc9487f /linux/drivers
parentbf8e2366acf0eddbefdabe74b14e0b3634fcd669 (diff)
downloadmediapointer-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.c2
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;
}