aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2009-10-01 12:44:49 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:40:25 -0500
commit0d07e240c5da04db7c26dd4e337b3845be99d5f8 (patch)
tree97ac8421bb756ae6008bddd2cb7860ff1295e957 /drivers/media/video/gspca/gspca.c
parent1d76331ddbb43c04d4d62bf5b9cc93efc05149c7 (diff)
V4L/DVB (13115): gspca - main: More information messages.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r--drivers/media/video/gspca/gspca.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index 23d3fb776918..179cbc14ee51 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -980,7 +980,7 @@ static void gspca_release(struct video_device *vfd)
980{ 980{
981 struct gspca_dev *gspca_dev = container_of(vfd, struct gspca_dev, vdev); 981 struct gspca_dev *gspca_dev = container_of(vfd, struct gspca_dev, vdev);
982 982
983 PDEBUG(D_STREAM, "device released"); 983 PDEBUG(D_PROBE, "/dev/video%d released", gspca_dev->vdev.num);
984 984
985 kfree(gspca_dev->usb_buf); 985 kfree(gspca_dev->usb_buf);
986 kfree(gspca_dev); 986 kfree(gspca_dev);
@@ -991,7 +991,7 @@ static int dev_open(struct file *file)
991 struct gspca_dev *gspca_dev; 991 struct gspca_dev *gspca_dev;
992 int ret; 992 int ret;
993 993
994 PDEBUG(D_STREAM, "%s open", current->comm); 994 PDEBUG(D_STREAM, "[%s] open", current->comm);
995 gspca_dev = (struct gspca_dev *) video_devdata(file); 995 gspca_dev = (struct gspca_dev *) video_devdata(file);
996 if (mutex_lock_interruptible(&gspca_dev->queue_lock)) 996 if (mutex_lock_interruptible(&gspca_dev->queue_lock))
997 return -ERESTARTSYS; 997 return -ERESTARTSYS;
@@ -1037,7 +1037,7 @@ static int dev_close(struct file *file)
1037{ 1037{
1038 struct gspca_dev *gspca_dev = file->private_data; 1038 struct gspca_dev *gspca_dev = file->private_data;
1039 1039
1040 PDEBUG(D_STREAM, "%s close", current->comm); 1040 PDEBUG(D_STREAM, "[%s] close", current->comm);
1041 if (mutex_lock_interruptible(&gspca_dev->queue_lock)) 1041 if (mutex_lock_interruptible(&gspca_dev->queue_lock))
1042 return -ERESTARTSYS; 1042 return -ERESTARTSYS;
1043 gspca_dev->users--; 1043 gspca_dev->users--;
@@ -2001,11 +2001,15 @@ int gspca_dev_probe(struct usb_interface *intf,
2001 PDEBUG(D_PROBE, "probing %04x:%04x", id->idVendor, id->idProduct); 2001 PDEBUG(D_PROBE, "probing %04x:%04x", id->idVendor, id->idProduct);
2002 2002
2003 /* we don't handle multi-config cameras */ 2003 /* we don't handle multi-config cameras */
2004 if (dev->descriptor.bNumConfigurations != 1) 2004 if (dev->descriptor.bNumConfigurations != 1) {
2005 PDEBUG(D_ERR, "Too many config");
2005 return -ENODEV; 2006 return -ENODEV;
2007 }
2006 interface = &intf->cur_altsetting->desc; 2008 interface = &intf->cur_altsetting->desc;
2007 if (interface->bInterfaceNumber > 0) 2009 if (interface->bInterfaceNumber > 0) {
2010 PDEBUG(D_ERR, "intf != 0");
2008 return -ENODEV; 2011 return -ENODEV;
2012 }
2009 2013
2010 /* create the device */ 2014 /* create the device */
2011 if (dev_size < sizeof *gspca_dev) 2015 if (dev_size < sizeof *gspca_dev)
@@ -2059,7 +2063,7 @@ int gspca_dev_probe(struct usb_interface *intf,
2059 } 2063 }
2060 2064
2061 usb_set_intfdata(intf, gspca_dev); 2065 usb_set_intfdata(intf, gspca_dev);
2062 PDEBUG(D_PROBE, "probe ok"); 2066 PDEBUG(D_PROBE, "/dev/video%d created", gspca_dev->vdev.num);
2063 return 0; 2067 return 0;
2064out: 2068out:
2065 kfree(gspca_dev->usb_buf); 2069 kfree(gspca_dev->usb_buf);
@@ -2078,6 +2082,7 @@ void gspca_disconnect(struct usb_interface *intf)
2078{ 2082{
2079 struct gspca_dev *gspca_dev = usb_get_intfdata(intf); 2083 struct gspca_dev *gspca_dev = usb_get_intfdata(intf);
2080 2084
2085 PDEBUG(D_PROBE, "/dev/video%d disconnect", gspca_dev->vdev.num);
2081 mutex_lock(&gspca_dev->usb_lock); 2086 mutex_lock(&gspca_dev->usb_lock);
2082 gspca_dev->present = 0; 2087 gspca_dev->present = 0;
2083 2088
@@ -2096,7 +2101,7 @@ void gspca_disconnect(struct usb_interface *intf)
2096 /* (this will call gspca_release() immediatly or on last close) */ 2101 /* (this will call gspca_release() immediatly or on last close) */
2097 video_unregister_device(&gspca_dev->vdev); 2102 video_unregister_device(&gspca_dev->vdev);
2098 2103
2099 PDEBUG(D_PROBE, "disconnect complete"); 2104/* PDEBUG(D_PROBE, "disconnect complete"); */
2100} 2105}
2101EXPORT_SYMBOL(gspca_disconnect); 2106EXPORT_SYMBOL(gspca_disconnect);
2102 2107