Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173927
b: refs/heads/master
c: 0d07e24
h: refs/heads/master
i:
  173925: 782e461
  173923: 7b9520f
  173919: cf97943
v: v3
  • Loading branch information
Jean-Francois Moine authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent c307f64 commit 074d404
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 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: 1d76331ddbb43c04d4d62bf5b9cc93efc05149c7
refs/heads/master: 0d07e240c5da04db7c26dd4e337b3845be99d5f8
19 changes: 12 additions & 7 deletions trunk/drivers/media/video/gspca/gspca.c
Original file line number Diff line number Diff line change
Expand Up @@ -980,7 +980,7 @@ static void gspca_release(struct video_device *vfd)
{
struct gspca_dev *gspca_dev = container_of(vfd, struct gspca_dev, vdev);

PDEBUG(D_STREAM, "device released");
PDEBUG(D_PROBE, "/dev/video%d released", gspca_dev->vdev.num);

kfree(gspca_dev->usb_buf);
kfree(gspca_dev);
Expand All @@ -991,7 +991,7 @@ static int dev_open(struct file *file)
struct gspca_dev *gspca_dev;
int ret;

PDEBUG(D_STREAM, "%s open", current->comm);
PDEBUG(D_STREAM, "[%s] open", current->comm);
gspca_dev = (struct gspca_dev *) video_devdata(file);
if (mutex_lock_interruptible(&gspca_dev->queue_lock))
return -ERESTARTSYS;
Expand Down Expand Up @@ -1037,7 +1037,7 @@ static int dev_close(struct file *file)
{
struct gspca_dev *gspca_dev = file->private_data;

PDEBUG(D_STREAM, "%s close", current->comm);
PDEBUG(D_STREAM, "[%s] close", current->comm);
if (mutex_lock_interruptible(&gspca_dev->queue_lock))
return -ERESTARTSYS;
gspca_dev->users--;
Expand Down Expand Up @@ -2001,11 +2001,15 @@ int gspca_dev_probe(struct usb_interface *intf,
PDEBUG(D_PROBE, "probing %04x:%04x", id->idVendor, id->idProduct);

/* we don't handle multi-config cameras */
if (dev->descriptor.bNumConfigurations != 1)
if (dev->descriptor.bNumConfigurations != 1) {
PDEBUG(D_ERR, "Too many config");
return -ENODEV;
}
interface = &intf->cur_altsetting->desc;
if (interface->bInterfaceNumber > 0)
if (interface->bInterfaceNumber > 0) {
PDEBUG(D_ERR, "intf != 0");
return -ENODEV;
}

/* create the device */
if (dev_size < sizeof *gspca_dev)
Expand Down Expand Up @@ -2059,7 +2063,7 @@ int gspca_dev_probe(struct usb_interface *intf,
}

usb_set_intfdata(intf, gspca_dev);
PDEBUG(D_PROBE, "probe ok");
PDEBUG(D_PROBE, "/dev/video%d created", gspca_dev->vdev.num);
return 0;
out:
kfree(gspca_dev->usb_buf);
Expand All @@ -2078,6 +2082,7 @@ void gspca_disconnect(struct usb_interface *intf)
{
struct gspca_dev *gspca_dev = usb_get_intfdata(intf);

PDEBUG(D_PROBE, "/dev/video%d disconnect", gspca_dev->vdev.num);
mutex_lock(&gspca_dev->usb_lock);
gspca_dev->present = 0;

Expand All @@ -2096,7 +2101,7 @@ void gspca_disconnect(struct usb_interface *intf)
/* (this will call gspca_release() immediatly or on last close) */
video_unregister_device(&gspca_dev->vdev);

PDEBUG(D_PROBE, "disconnect complete");
/* PDEBUG(D_PROBE, "disconnect complete"); */
}
EXPORT_SYMBOL(gspca_disconnect);

Expand Down

0 comments on commit 074d404

Please sign in to comment.