Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306141
b: refs/heads/master
c: 5f5f147
h: refs/heads/master
i:
  306139: 27d4ffd
v: v3
  • Loading branch information
Gianluca Gennari authored and Mauro Carvalho Chehab committed Apr 10, 2012
1 parent 241f498 commit be886ab
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 95faf82bd3ea607f8e1ca78930c49b71078266e6
refs/heads/master: 5f5f147f638734c0739b663aa68a3ae03cdc682b
26 changes: 25 additions & 1 deletion trunk/drivers/media/video/em28xx/em28xx-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,6 @@ int em28xx_capture_start(struct em28xx *dev, int start)

return rc;
}
EXPORT_SYMBOL_GPL(em28xx_capture_start);

int em28xx_vbi_supported(struct em28xx *dev)
{
Expand Down Expand Up @@ -1007,6 +1006,31 @@ void em28xx_uninit_isoc(struct em28xx *dev, enum em28xx_mode mode)
}
EXPORT_SYMBOL_GPL(em28xx_uninit_isoc);

/*
* Stop URBs
*/
void em28xx_stop_urbs(struct em28xx *dev)
{
int i;
struct urb *urb;
struct em28xx_usb_isoc_bufs *isoc_bufs = &dev->isoc_ctl.digital_bufs;

em28xx_isocdbg("em28xx: called em28xx_stop_urbs\n");

for (i = 0; i < isoc_bufs->num_bufs; i++) {
urb = isoc_bufs->urb[i];
if (urb) {
if (!irqs_disabled())
usb_kill_urb(urb);
else
usb_unlink_urb(urb);
}
}

em28xx_capture_start(dev, 0);
}
EXPORT_SYMBOL_GPL(em28xx_stop_urbs);

/*
* Allocate URBs
*/
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/media/video/em28xx/em28xx-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ static int em28xx_stop_streaming(struct em28xx_dvb *dvb)
{
struct em28xx *dev = dvb->adapter.priv;

em28xx_capture_start(dev, 0);
em28xx_stop_urbs(dev);

em28xx_set_mode(dev, EM28XX_SUSPEND);

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/media/video/em28xx/em28xx.h
Original file line number Diff line number Diff line change
Expand Up @@ -695,6 +695,7 @@ int em28xx_init_isoc(struct em28xx *dev, enum em28xx_mode mode,
int max_packets, int num_bufs, int max_pkt_size,
int (*isoc_copy) (struct em28xx *dev, struct urb *urb));
void em28xx_uninit_isoc(struct em28xx *dev, enum em28xx_mode mode);
void em28xx_stop_urbs(struct em28xx *dev);
int em28xx_isoc_dvb_max_packetsize(struct em28xx *dev);
int em28xx_set_mode(struct em28xx *dev, enum em28xx_mode set_mode);
int em28xx_gpio_set(struct em28xx *dev, struct em28xx_reg_seq *gpio);
Expand Down

0 comments on commit be886ab

Please sign in to comment.