thermal: sprd: remove build warnings
[profile/mobile/platform/kernel/linux-3.10-sc7730.git] / drivers / thermal / sprd_ddie_thm.c
index 3e71c06..b34e274 100644 (file)
@@ -300,7 +300,7 @@ static int sprd_thm_regs_set(struct sprd_thermal_zone *pzone,unsigned int*regs)
        return 0;
 }
 #endif
-static int sprd_thm_temp_read(struct sprd_thermal_zone *pzone)
+static unsigned long sprd_thm_temp_read(struct sprd_thermal_zone *pzone)
 {
        u32 rawdata = 0;
        int cal_offset = 0;
@@ -452,13 +452,13 @@ int sprd_thm_hw_enable_sensor(struct sprd_thermal_zone *pzone)
                                (BIT_THM_RTC_EB | BIT_GPU_THMA_RTC_EB |
                                BIT_GPU_THMA_RTC_AUTO_EN | BIT_ARM_THMA_RTC_EB | BIT_ARM_THMA_RTC_AUTO_EN));
 #endif
-               __thm_reg_write((pzone->reg_base + SENSOR_CTRL + LOCAL_SENSOR_ADDR_OFF), 0x030, 0x0);
-               __thm_reg_write((pzone->reg_base + SENSOR_CTRL), 0x31, 0x0);
+               __thm_reg_write((uintptr_t)(pzone->reg_base + SENSOR_CTRL + LOCAL_SENSOR_ADDR_OFF), 0x030, 0x0);
+               __thm_reg_write((uintptr_t)(pzone->reg_base + SENSOR_CTRL), 0x31, 0x0);
        } else if (SPRD_GPU_SENSOR == pzone->sensor_id) {
                /*sci_glb_set(REG_AON_APB_APB_RTC_EB,
                                (BIT_THM_RTC_EB | BIT_GPU_THMA_RTC_EB |
                                BIT_GPU_THMA_RTC_AUTO_EN | BIT_ARM_THMA_RTC_EB |BIT_ARM_THMA_RTC_AUTO_EN ) );*/
-               __thm_reg_write((pzone->reg_base + SENSOR_CTRL+LOCAL_SENSOR_ADDR_OFF), 0x31, 0x0);
+               __thm_reg_write((uintptr_t)(pzone->reg_base + SENSOR_CTRL+LOCAL_SENSOR_ADDR_OFF), 0x31, 0x0);
        } else {
                THM_DEBUG("the sensor id is error \n");
        }
@@ -469,7 +469,6 @@ int sprd_thm_hw_enable_sensor(struct sprd_thermal_zone *pzone)
 u16 int_ctrl_reg[SPRD_MAX_SENSOR];
 int sprd_thm_hw_suspend(struct sprd_thermal_zone *pzone)
 {
-       u32 local_sen_id = 0;
        unsigned long local_sensor_addr;
        int ret = 0;
 
@@ -495,7 +494,6 @@ int sprd_thm_hw_suspend(struct sprd_thermal_zone *pzone)
 }
 int sprd_thm_hw_resume(struct sprd_thermal_zone *pzone)
 {
-       u32 local_sen_id = 0;
        unsigned long local_sensor_addr;
        int ret = 0;