Skip to content

Commit

Permalink
[media] staging: easycap: Clean comment style in easycap_delete()
Browse files Browse the repository at this point in the history
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Ezequiel García authored and Mauro Carvalho Chehab committed May 15, 2012
1 parent cf32b65 commit df8c4b7
Showing 1 changed file with 16 additions and 27 deletions.
43 changes: 16 additions & 27 deletions drivers/staging/media/easycap/easycap_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,17 +700,13 @@ static int videodev_release(struct video_device *pvideo_device)
JOM(4, "ending successfully\n");
return 0;
}
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
/*****************************************************************************/
/*--------------------------------------------------------------------------*/

/*
* THIS FUNCTION IS CALLED FROM WITHIN easycap_usb_disconnect() AND IS
* PROTECTED BY SEMAPHORES SET AND CLEARED BY easycap_usb_disconnect().
*
* BY THIS STAGE THE DEVICE HAS ALREADY BEEN PHYSICALLY UNPLUGGED, SO
* peasycap->pusb_device IS NO LONGER VALID.
* This function is called from within easycap_usb_disconnect() and is
* protected by semaphores set and cleared by easycap_usb_disconnect().
* By this stage the device has already been physically unplugged,
* so peasycap->pusb_device is no longer valid.
*/
/*---------------------------------------------------------------------------*/
static void easycap_delete(struct kref *pkref)
{
struct easycap *peasycap;
Expand All @@ -731,11 +727,8 @@ static void easycap_delete(struct kref *pkref)
return;
}
kd = easycap_isdongle(peasycap);
/*---------------------------------------------------------------------------*/
/*
* FREE VIDEO.
*/
/*---------------------------------------------------------------------------*/

/* Free video urbs */
if (peasycap->purb_video_head) {
m = 0;
list_for_each(plist_head, peasycap->purb_video_head) {
Expand All @@ -750,7 +743,6 @@ static void easycap_delete(struct kref *pkref)
}

JOM(4, "%i video urbs freed\n", m);
/*---------------------------------------------------------------------------*/
JOM(4, "freeing video data_urb structures.\n");
m = 0;
list_for_each_safe(plist_head, plist_next,
Expand All @@ -768,7 +760,8 @@ static void easycap_delete(struct kref *pkref)
JOM(4, "setting peasycap->purb_video_head=NULL\n");
peasycap->purb_video_head = NULL;
}
/*---------------------------------------------------------------------------*/

/* Free video isoc buffers */
JOM(4, "freeing video isoc buffers.\n");
m = 0;
for (k = 0; k < VIDEO_ISOC_BUFFER_MANY; k++) {
Expand All @@ -784,7 +777,7 @@ static void easycap_delete(struct kref *pkref)
}
JOM(4, "isoc video buffers freed: %i pages\n",
m * (0x01 << VIDEO_ISOC_ORDER));
/*---------------------------------------------------------------------------*/
/* Free video field buffers */
JOM(4, "freeing video field buffers.\n");
gone = 0;
for (k = 0; k < FIELD_BUFFER_MANY; k++) {
Expand All @@ -799,7 +792,8 @@ static void easycap_delete(struct kref *pkref)
}
}
JOM(4, "video field buffers freed: %i pages\n", gone);
/*---------------------------------------------------------------------------*/

/* Free video frame buffers */
JOM(4, "freeing video frame buffers.\n");
gone = 0;
for (k = 0; k < FRAME_BUFFER_MANY; k++) {
Expand All @@ -814,11 +808,8 @@ static void easycap_delete(struct kref *pkref)
}
}
JOM(4, "video frame buffers freed: %i pages\n", gone);
/*---------------------------------------------------------------------------*/
/*
* FREE AUDIO.
*/
/*---------------------------------------------------------------------------*/

/* Free audio urbs */
if (peasycap->purb_audio_head) {
JOM(4, "freeing audio urbs\n");
m = 0;
Expand All @@ -833,7 +824,6 @@ static void easycap_delete(struct kref *pkref)
}
}
JOM(4, "%i audio urbs freed\n", m);
/*---------------------------------------------------------------------------*/
JOM(4, "freeing audio data_urb structures.\n");
m = 0;
list_for_each_safe(plist_head, plist_next,
Expand All @@ -851,7 +841,8 @@ static void easycap_delete(struct kref *pkref)
JOM(4, "setting peasycap->purb_audio_head=NULL\n");
peasycap->purb_audio_head = NULL;
}
/*---------------------------------------------------------------------------*/

/* Free audio isoc buffers */
JOM(4, "freeing audio isoc buffers.\n");
m = 0;
for (k = 0; k < AUDIO_ISOC_BUFFER_MANY; k++) {
Expand All @@ -867,7 +858,6 @@ static void easycap_delete(struct kref *pkref)
}
JOM(4, "easyoss_delete(): isoc audio buffers freed: %i pages\n",
m * (0x01 << AUDIO_ISOC_ORDER));
/*---------------------------------------------------------------------------*/
JOM(4, "freeing easycap structure.\n");
allocation_video_urb = peasycap->allocation_video_urb;
allocation_video_page = peasycap->allocation_video_page;
Expand Down Expand Up @@ -895,7 +885,6 @@ static void easycap_delete(struct kref *pkref)

kfree(peasycap);

/*---------------------------------------------------------------------------*/
SAY("%8i=video urbs after all deletions\n", allocation_video_urb);
SAY("%8i=video pages after all deletions\n", allocation_video_page);
SAY("%8i=video structs after all deletions\n", allocation_video_struct);
Expand Down

0 comments on commit df8c4b7

Please sign in to comment.