Commit cf32b65d authored by Ezequiel García's avatar Ezequiel García Committed by Mauro Carvalho Chehab

[media] staging: easycap: Clean comment style in easycap_usb_disconnect()

Signed-off-by: default avatarEzequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent de6ffc5e
...@@ -3973,15 +3973,13 @@ static int easycap_usb_probe(struct usb_interface *intf, ...@@ -3973,15 +3973,13 @@ static int easycap_usb_probe(struct usb_interface *intf,
SAM("ends successfully for interface %i\n", bInterfaceNumber); SAM("ends successfully for interface %i\n", bInterfaceNumber);
return 0; return 0;
} }
/*****************************************************************************/
/*---------------------------------------------------------------------------*/
/* /*
* WHEN THIS FUNCTION IS CALLED THE EasyCAP HAS ALREADY BEEN PHYSICALLY * When this function is called the device has already been
* UNPLUGGED. HENCE peasycap->pusb_device IS NO LONGER VALID. * physically unplugged.
* * Hence, peasycap->pusb_device is no longer valid.
* THIS FUNCTION AFFECTS ALSA. BEWARE. * This function affects alsa.
*/ */
/*---------------------------------------------------------------------------*/
static void easycap_usb_disconnect(struct usb_interface *pusb_interface) static void easycap_usb_disconnect(struct usb_interface *pusb_interface)
{ {
struct usb_host_interface *pusb_host_interface; struct usb_host_interface *pusb_host_interface;
...@@ -4006,6 +4004,7 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface) ...@@ -4006,6 +4004,7 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface)
minor = pusb_interface->minor; minor = pusb_interface->minor;
JOT(4, "intf[%i]: minor=%i\n", bInterfaceNumber, minor); JOT(4, "intf[%i]: minor=%i\n", bInterfaceNumber, minor);
/* There is nothing to do for Interface Number 1 */
if (1 == bInterfaceNumber) if (1 == bInterfaceNumber)
return; return;
...@@ -4014,11 +4013,8 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface) ...@@ -4014,11 +4013,8 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface)
SAY("ERROR: peasycap is NULL\n"); SAY("ERROR: peasycap is NULL\n");
return; return;
} }
/*---------------------------------------------------------------------------*/
/* /* If the waitqueues are not cleared a deadlock is possible */
* IF THE WAIT QUEUES ARE NOT CLEARED A DEADLOCK IS POSSIBLE. BEWARE.
*/
/*---------------------------------------------------------------------------*/
peasycap->video_eof = 1; peasycap->video_eof = 1;
peasycap->audio_eof = 1; peasycap->audio_eof = 1;
wake_up_interruptible(&(peasycap->wq_video)); wake_up_interruptible(&(peasycap->wq_video));
...@@ -4034,15 +4030,14 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface) ...@@ -4034,15 +4030,14 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface)
default: default:
break; break;
} }
/*--------------------------------------------------------------------------*/
/* /*
* DEREGISTER * Deregister
* * This procedure will block until easycap_poll(),
* THIS PROCEDURE WILL BLOCK UNTIL easycap_poll(), VIDEO IOCTL AND AUDIO * video and audio ioctl are all unlocked.
* IOCTL ARE ALL UNLOCKED. IF THIS IS NOT DONE AN Oops CAN OCCUR WHEN * If this is not done an oops can occur when an easycap
* AN EasyCAP IS UNPLUGGED WHILE THE URBS ARE RUNNING. BEWARE. * is unplugged while the urbs are running.
*/ */
/*--------------------------------------------------------------------------*/
kd = easycap_isdongle(peasycap); kd = easycap_isdongle(peasycap);
switch (bInterfaceNumber) { switch (bInterfaceNumber) {
case 0: { case 0: {
...@@ -4059,7 +4054,6 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface) ...@@ -4059,7 +4054,6 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface)
} else { } else {
SAY("ERROR: %i=kd is bad: cannot lock dongle\n", kd); SAY("ERROR: %i=kd is bad: cannot lock dongle\n", kd);
} }
/*---------------------------------------------------------------------------*/
if (!peasycap->v4l2_device.name[0]) { if (!peasycap->v4l2_device.name[0]) {
SAM("ERROR: peasycap->v4l2_device.name is empty\n"); SAM("ERROR: peasycap->v4l2_device.name is empty\n");
if (0 <= kd && DONGLE_MANY > kd) if (0 <= kd && DONGLE_MANY > kd)
...@@ -4075,7 +4069,6 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface) ...@@ -4075,7 +4069,6 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface)
JOM(4, "intf[%i]: video_unregister_device() minor=%i\n", JOM(4, "intf[%i]: video_unregister_device() minor=%i\n",
bInterfaceNumber, minor); bInterfaceNumber, minor);
peasycap->registered_video--; peasycap->registered_video--;
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
if (0 <= kd && DONGLE_MANY > kd) { if (0 <= kd && DONGLE_MANY > kd) {
mutex_unlock(&easycapdc60_dongle[kd].mutex_video); mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
...@@ -4111,12 +4104,12 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface) ...@@ -4111,12 +4104,12 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface)
default: default:
break; break;
} }
/*---------------------------------------------------------------------------*/
/* /*
* CALL easycap_delete() IF NO REMAINING REFERENCES TO peasycap * If no remaining references to peasycap,
* (ALSO WHEN ALSA HAS BEEN IN USE) * call easycap_delete.
*/ * (Also when alsa has been in use)
/*---------------------------------------------------------------------------*/ */
if (!peasycap->kref.refcount.counter) { if (!peasycap->kref.refcount.counter) {
SAM("ERROR: peasycap->kref.refcount.counter is zero " SAM("ERROR: peasycap->kref.refcount.counter is zero "
"so cannot call kref_put()\n"); "so cannot call kref_put()\n");
...@@ -4151,17 +4144,11 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface) ...@@ -4151,17 +4144,11 @@ static void easycap_usb_disconnect(struct usb_interface *pusb_interface)
mutex_unlock(&easycapdc60_dongle[kd].mutex_video); mutex_unlock(&easycapdc60_dongle[kd].mutex_video);
JOT(4, "unlocked dongle[%i].mutex_video\n", kd); JOT(4, "unlocked dongle[%i].mutex_video\n", kd);
} }
/*---------------------------------------------------------------------------*/
JOM(4, "ends\n"); JOM(4, "ends\n");
return; return;
} }
/*****************************************************************************/
/*---------------------------------------------------------------------------*/ /* Devices supported by this driver */
/*
* PARAMETERS APPLICABLE TO ENTIRE DRIVER, I.E. BOTH VIDEO AND AUDIO
*/
/*---------------------------------------------------------------------------*/
static struct usb_device_id easycap_usb_device_id_table[] = { static struct usb_device_id easycap_usb_device_id_table[] = {
{USB_DEVICE(USB_EASYCAP_VENDOR_ID, USB_EASYCAP_PRODUCT_ID)}, {USB_DEVICE(USB_EASYCAP_VENDOR_ID, USB_EASYCAP_PRODUCT_ID)},
{ } { }
...@@ -4196,14 +4183,11 @@ static int __init easycap_module_init(void) ...@@ -4196,14 +4183,11 @@ static int __init easycap_module_init(void)
return rc; return rc;
} }
/*****************************************************************************/
static void __exit easycap_module_exit(void) static void __exit easycap_module_exit(void)
{ {
usb_deregister(&easycap_usb_driver); usb_deregister(&easycap_usb_driver);
} }
/*****************************************************************************/
module_init(easycap_module_init); module_init(easycap_module_init);
module_exit(easycap_module_exit); module_exit(easycap_module_exit);
/*****************************************************************************/
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