platform-x86: intel_mid_thermal: Fix coding style
Before fixing checkpatch.pl reported 74 errors and 234 warnings Signed-off-by: Ameya Palande <ameya.palande@nokia.com> Signed-off-by: Matthew Garrett <mjg@redhat.com>
This commit is contained in:
committed by
Matthew Garrett
parent
ad3f2f038f
commit
253a0069d7
@@ -51,7 +51,8 @@
|
|||||||
|
|
||||||
#define MSIC_STOPBIT_MASK 16
|
#define MSIC_STOPBIT_MASK 16
|
||||||
#define MSIC_ADCTHERM_MASK 4
|
#define MSIC_ADCTHERM_MASK 4
|
||||||
#define ADC_CHANLS_MAX 15 /* Number of ADC channels */
|
/* Number of ADC channels */
|
||||||
|
#define ADC_CHANLS_MAX 15
|
||||||
#define ADC_LOOP_MAX (ADC_CHANLS_MAX - MSIC_THERMAL_SENSORS)
|
#define ADC_LOOP_MAX (ADC_CHANLS_MAX - MSIC_THERMAL_SENSORS)
|
||||||
|
|
||||||
/* ADC channel code values */
|
/* ADC channel code values */
|
||||||
@@ -245,7 +246,6 @@ static int configure_adc(int val)
|
|||||||
/* Just stop the ADC */
|
/* Just stop the ADC */
|
||||||
data &= (~MSIC_ADC_START);
|
data &= (~MSIC_ADC_START);
|
||||||
}
|
}
|
||||||
|
|
||||||
return intel_scu_ipc_iowrite8(MSIC_THERM_ADC1CNTL1, data);
|
return intel_scu_ipc_iowrite8(MSIC_THERM_ADC1CNTL1, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -275,7 +275,7 @@ static int set_up_therm_channel(u16 base_addr)
|
|||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
/* Since this is the last channel, set the stop bit
|
/* Since this is the last channel, set the stop bit
|
||||||
to 1 by ORing the DIE_SENSOR_CODE with 0x10 */
|
* to 1 by ORing the DIE_SENSOR_CODE with 0x10 */
|
||||||
ret = intel_scu_ipc_iowrite8(base_addr + 3,
|
ret = intel_scu_ipc_iowrite8(base_addr + 3,
|
||||||
(MSIC_DIE_SENSOR_CODE | 0x10));
|
(MSIC_DIE_SENSOR_CODE | 0x10));
|
||||||
if (ret)
|
if (ret)
|
||||||
@@ -462,7 +462,6 @@ static struct thermal_zone_device_ops tzd_ops = {
|
|||||||
.get_temp = read_curr_temp,
|
.get_temp = read_curr_temp,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* mid_thermal_probe - mfld thermal initialize
|
* mid_thermal_probe - mfld thermal initialize
|
||||||
* @pdev: platform device structure
|
* @pdev: platform device structure
|
||||||
@@ -495,8 +494,7 @@ static int mid_thermal_probe(struct platform_device *pdev)
|
|||||||
/* Register each sensor with the generic thermal framework*/
|
/* Register each sensor with the generic thermal framework*/
|
||||||
for (i = 0; i < MSIC_THERMAL_SENSORS; i++) {
|
for (i = 0; i < MSIC_THERMAL_SENSORS; i++) {
|
||||||
pinfo->tzd[i] = thermal_zone_device_register(name[i],
|
pinfo->tzd[i] = thermal_zone_device_register(name[i],
|
||||||
0, initialize_sensor(i),
|
0, initialize_sensor(i), &tzd_ops, 0, 0, 0, 0);
|
||||||
&tzd_ops, 0, 0, 0, 0);
|
|
||||||
if (IS_ERR(pinfo->tzd[i]))
|
if (IS_ERR(pinfo->tzd[i]))
|
||||||
goto reg_fail;
|
goto reg_fail;
|
||||||
}
|
}
|
||||||
@@ -535,10 +533,6 @@ static int mid_thermal_remove(struct platform_device *pdev)
|
|||||||
return configure_adc(0);
|
return configure_adc(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
|
||||||
* Driver initialisation and finalization
|
|
||||||
*********************************************************************/
|
|
||||||
|
|
||||||
#define DRIVER_NAME "msic_sensor"
|
#define DRIVER_NAME "msic_sensor"
|
||||||
|
|
||||||
static const struct platform_device_id therm_id_table[] = {
|
static const struct platform_device_id therm_id_table[] = {
|
||||||
|
Reference in New Issue
Block a user