vibrator: tspdrv: clean up codes
Change-Id: I85ecec9fb01e21ea0cdf3fda1c43851c26c7f552
diff --git a/drivers/misc/tspdrv/VibeOSKernelLinuxTime.c b/drivers/misc/tspdrv/VibeOSKernelLinuxTime.c
index 39f7391..f3519ad 100644
--- a/drivers/misc/tspdrv/VibeOSKernelLinuxTime.c
+++ b/drivers/misc/tspdrv/VibeOSKernelLinuxTime.c
@@ -1,37 +1,34 @@
/*
-** =========================================================================
-** File:
-** VibeOSKernelLinuxTime.c
-**
-** Description:
-** Time helper functions for Linux.
-**
-** Portions Copyright (c) 2008-2011 Immersion Corporation. All Rights Reserved.
-**
-** This file contains Original Code and/or Modifications of Original Code
-** as defined in and that are subject to the GNU Public License v2 -
-** (the 'License'). You may not use this file except in compliance with the
-** License. You should have received a copy of the GNU General Public License
-** along with this program; if not, write to the Free Software Foundation, Inc.,
-** 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or contact
-** TouchSenseSales@immersion.com.
-**
-** The Original Code and all software distributed under the License are
-** distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
-** EXPRESS OR IMPLIED, AND IMMERSION HEREBY DISCLAIMS ALL SUCH WARRANTIES,
-** INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
-** FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see
-** the License for the specific language governing rights and limitations
-** under the License.
-** =========================================================================
-*/
+ * File: VibeOSKernelLinuxTime.c
+ *
+ * Description:
+ * Time helper functions for Linux.
+ *
+ * Portions Copyright (c) 2008-2011 Immersion Corporation. All Rights Reserved.
+ *
+ * This file contains Original Code and/or Modifications of Original Code
+ * as defined in and that are subject to the GNU Public License v2 -
+ * (the 'License'). You may not use this file except in compliance with the
+ * License. You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or contact
+ * TouchSenseSales@immersion.com.
+ *
+ * The Original Code and all software distributed under the License are
+ * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
+ * EXPRESS OR IMPLIED, AND IMMERSION HEREBY DISCLAIMS ALL SUCH WARRANTIES,
+ * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS
+ * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. Please see
+ * the License for the specific language governing rights and limitations
+ * under the License.
+ */
#error "Please read the following statement"
/*
-** Kernel standard software timer is used as an example but another type
-** of timer (such as HW timer or high-resolution software timer) might be used
-** to achieve the 5ms required rate.
-*/
+ * Kernel standard software timer is used as an example but another type
+ * of timer (such as HW timer or high-resolution software timer) might be used
+ * to achieve the 5ms required rate.
+ */
#error "End of statement"
#if (HZ != 1000)
@@ -96,8 +93,10 @@
((++g_nWatchdogCounter) > WATCHDOG_TIMEOUT)) {
VibeInt8 cZero[1] = {0};
- /* Nothing to play for all actuators,
- turn off the timer when we reach the watchdog tick count limit */
+ /* Nothing to play for all actuators,
+ * turn off the timer when we reach
+ * the watchdog tick count limit
+ */
ImmVibeSPI_ForceOut_SetSamples(i, 8, 1, cZero);
ImmVibeSPI_ForceOut_AmpDisable(i);
VibeOSKernelLinuxStopTimer();
@@ -194,9 +193,10 @@
return;
/*
- ** Use interruptible version of down to be safe
- ** (try to not being stuck here if the mutex is not freed for any reason)
- */
+ * Use interruptible version of down to be safe
+ * (try to not being stuck here
+ * if the mutex is not freed for any reason)
+ */
res = down_interruptible(&g_hMutex); /* wait for the mutex to be freed by the timer */
if (res != 0) {
DbgOut((KERN_INFO "VibeOSKernelLinuxStartTimer: down_interruptible interrupted by a signal.\n"));
@@ -211,11 +211,13 @@
g_bTimerStarted = false;
/*
- ** Stop the timer.
- ** Use del_timer vs. del_timer_sync
- ** del_timer_sync may cause a Kernel "soft lockup" on multi-CPU platforms
- ** as VibeOSKernelLinuxStopTimer is called from the timer tick handler.
- */
+ * Stop the timer.
+ * Use del_timer vs. del_timer_sync
+ * del_timer_sync may cause a Kernel "soft lockup"
+ * on multi-CPU platforms
+ * as VibeOSKernelLinuxStopTimer is called
+ * from the timer tick handler.
+ */
del_timer(&g_timerList);
}