projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
30d35e4
)
V4L/DVB (11712): gspca - main: Set the current alternate setting only when needed
author
Jean-Francois Moine
<moinejf@free.fr>
Tue, 21 Apr 2009 17:05:44 +0000
(14:05 -0300)
committer
Mauro Carvalho Chehab
<mchehab@redhat.com>
Tue, 16 Jun 2009 21:20:55 +0000
(18:20 -0300)
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/gspca/gspca.c
patch
|
blob
|
history
diff --git
a/drivers/media/video/gspca/gspca.c
b/drivers/media/video/gspca/gspca.c
index efa4dd349f608256e819d32c31223d6c75c18ca7..ebeae6bdacc8ed8d7e1843e6d6e026677eea3223 100644
(file)
--- a/
drivers/media/video/gspca/gspca.c
+++ b/
drivers/media/video/gspca/gspca.c
@@
-486,7
+486,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);
- if (
i > 0
) {
+ if (
gspca_dev->nbalt > 1
) {
ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, i);
if (ret < 0) {
err("set alt %d err %d", i, ret);
@@
-653,6
+653,8
@@
static int gspca_set_alt0(struct gspca_dev *gspca_dev)
{
int ret;
+ if (gspca_dev->alt == 0)
+ return 0;
ret = usb_set_interface(gspca_dev->dev, gspca_dev->iface, 0);
if (ret < 0)
PDEBUG(D_ERR|D_STREAM, "set alt 0 err %d", ret);