summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2011-08-26 10:59:02 +0800
committerAnson Huang <b20788@freescale.com>2011-08-26 12:26:46 +0800
commit8981ab5203e20368d8aeffe70e0e866159c35aa1 (patch)
tree7da09b19032b8c884663bc84cc6b793eccc7e9ae /drivers
parent80f8da707a0c639bc6fe0bb2daf01baf1eb367b3 (diff)
ENGR00155391-2 [MX6]Clean up build warning
Fix build warning. Signed-off-by: Anson Huang <b20788@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mxc/thermal/thermal.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/drivers/mxc/thermal/thermal.c b/drivers/mxc/thermal/thermal.c
index c7cac6949467..c5566223a337 100644
--- a/drivers/mxc/thermal/thermal.c
+++ b/drivers/mxc/thermal/thermal.c
@@ -117,6 +117,8 @@
#define CONVER_CONST 1413 /* rough value, need calibration */
#define CONVER_DIV_1024 550 /* div value, need calibration */
+#define ANATOP_DEBUG false
+
MODULE_AUTHOR("Anson Huang");
MODULE_DESCRIPTION("ANATOP Thermal Zone Driver");
MODULE_LICENSE("GPL");
@@ -129,6 +131,8 @@ MODULE_PARM_DESC(psv, "Disable or override all passive trip points.");
static int anatop_thermal_add(struct anatop_device *device);
static int anatop_thermal_remove(struct platform_device *pdev);
+static int anatop_thermal_suspend(struct platform_device *pdev,
+ pm_message_t state);
static int anatop_thermal_resume(struct platform_device *pdev);
/* static void anatop_thermal_notify(struct anatop_device *device,
* u32 event); */
@@ -208,10 +212,10 @@ struct anatop_thermal {
struct mutex lock;
};
-/* ---------------------------------------------
+/* -----------------------------------------------------------
Thermal Zone Management
- --------------------------------------------- */
-static int anatop_dump_temperature_register()
+ ----------------------------------------------------------- */
+static int anatop_dump_temperature_register(void)
{
if (!anatop_base) {
pr_info("anatop_base is not initialized!!!\n");
@@ -222,6 +226,7 @@ static int anatop_dump_temperature_register()
__raw_readl(anatop_base + HW_ANADIG_TEMPSENSE0));
pr_info("HW_ANADIG_TEMPSENSE1 = 0x%x\n",
__raw_readl(anatop_base + HW_ANADIG_TEMPSENSE1));
+ return 0;
}
static int anatop_tempsense_value_to_dc(int val)
{
@@ -268,7 +273,8 @@ static int anatop_thermal_get_temperature(struct anatop_thermal *tz)
>> BP_ANADIG_TEMPSENSE0_TEMP_VALUE;
__raw_writel(BM_ANADIG_TEMPSENSE0_FINISHED,
anatop_base + HW_ANADIG_TEMPSENSE0_CLR);
- /* anatop_dump_temperature_register(); */
+ if (ANATOP_DEBUG)
+ anatop_dump_temperature_register();
}
tmp = tmp / 5;
@@ -725,10 +731,13 @@ static int anatop_thermal_remove(struct platform_device *pdev)
/* struct anatop_device *device = platform_get_drvdata(pdev); */
return 0;
}
-
+static int anatop_thermal_suspend(struct platform_device *pdev,
+pm_message_t state)
+{
+ return 0;
+}
static int anatop_thermal_resume(struct platform_device *pdev)
{
-
return 0;
}
static int anatop_thermal_power_on(void)
@@ -790,10 +799,6 @@ success:
pr_info("%s\n", __func__);
return retval;
}
-static int anatop_thermal_suspend(struct platform_device *pdev)
-{
- return 0;
-}
static struct platform_driver anatop_thermal_driver_ldm = {
.driver = {