Commit 0d07e240 authored by Jean-Francois Moine's avatar Jean-Francois Moine Committed by Mauro Carvalho Chehab

V4L/DVB (13115): gspca - main: More information messages.

Signed-off-by: default avatarJean-Francois Moine <moinejf@free.fr>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 1d76331d
...@@ -980,7 +980,7 @@ static void gspca_release(struct video_device *vfd) ...@@ -980,7 +980,7 @@ static void gspca_release(struct video_device *vfd)
{ {
struct gspca_dev *gspca_dev = container_of(vfd, struct gspca_dev, vdev); 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->usb_buf);
kfree(gspca_dev); kfree(gspca_dev);
...@@ -991,7 +991,7 @@ static int dev_open(struct file *file) ...@@ -991,7 +991,7 @@ static int dev_open(struct file *file)
struct gspca_dev *gspca_dev; struct gspca_dev *gspca_dev;
int ret; int ret;
PDEBUG(D_STREAM, "%s open", current->comm); PDEBUG(D_STREAM, "[%s] open", current->comm);
gspca_dev = (struct gspca_dev *) video_devdata(file); gspca_dev = (struct gspca_dev *) video_devdata(file);
if (mutex_lock_interruptible(&gspca_dev->queue_lock)) if (mutex_lock_interruptible(&gspca_dev->queue_lock))
return -ERESTARTSYS; return -ERESTARTSYS;
...@@ -1037,7 +1037,7 @@ static int dev_close(struct file *file) ...@@ -1037,7 +1037,7 @@ static int dev_close(struct file *file)
{ {
struct gspca_dev *gspca_dev = file->private_data; 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)) if (mutex_lock_interruptible(&gspca_dev->queue_lock))
return -ERESTARTSYS; return -ERESTARTSYS;
gspca_dev->users--; gspca_dev->users--;
...@@ -2001,11 +2001,15 @@ int gspca_dev_probe(struct usb_interface *intf, ...@@ -2001,11 +2001,15 @@ int gspca_dev_probe(struct usb_interface *intf,
PDEBUG(D_PROBE, "probing %04x:%04x", id->idVendor, id->idProduct); PDEBUG(D_PROBE, "probing %04x:%04x", id->idVendor, id->idProduct);
/* we don't handle multi-config cameras */ /* 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; return -ENODEV;
}
interface = &intf->cur_altsetting->desc; interface = &intf->cur_altsetting->desc;
if (interface->bInterfaceNumber > 0) if (interface->bInterfaceNumber > 0) {
PDEBUG(D_ERR, "intf != 0");
return -ENODEV; return -ENODEV;
}
/* create the device */ /* create the device */
if (dev_size < sizeof *gspca_dev) if (dev_size < sizeof *gspca_dev)
...@@ -2059,7 +2063,7 @@ int gspca_dev_probe(struct usb_interface *intf, ...@@ -2059,7 +2063,7 @@ int gspca_dev_probe(struct usb_interface *intf,
} }
usb_set_intfdata(intf, gspca_dev); usb_set_intfdata(intf, gspca_dev);
PDEBUG(D_PROBE, "probe ok"); PDEBUG(D_PROBE, "/dev/video%d created", gspca_dev->vdev.num);
return 0; return 0;
out: out:
kfree(gspca_dev->usb_buf); kfree(gspca_dev->usb_buf);
...@@ -2078,6 +2082,7 @@ void gspca_disconnect(struct usb_interface *intf) ...@@ -2078,6 +2082,7 @@ void gspca_disconnect(struct usb_interface *intf)
{ {
struct gspca_dev *gspca_dev = usb_get_intfdata(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); mutex_lock(&gspca_dev->usb_lock);
gspca_dev->present = 0; gspca_dev->present = 0;
...@@ -2096,7 +2101,7 @@ void gspca_disconnect(struct usb_interface *intf) ...@@ -2096,7 +2101,7 @@ void gspca_disconnect(struct usb_interface *intf)
/* (this will call gspca_release() immediatly or on last close) */ /* (this will call gspca_release() immediatly or on last close) */
video_unregister_device(&gspca_dev->vdev); video_unregister_device(&gspca_dev->vdev);
PDEBUG(D_PROBE, "disconnect complete"); /* PDEBUG(D_PROBE, "disconnect complete"); */
} }
EXPORT_SYMBOL(gspca_disconnect); EXPORT_SYMBOL(gspca_disconnect);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment