Loading drivers/platform/x86/intel_mid_thermal.c +300 −306 Original line number Diff line number Diff line Loading @@ -51,7 +51,8 @@ #define MSIC_STOPBIT_MASK 16 #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) /* ADC channel code values */ Loading Loading @@ -245,7 +246,6 @@ static int configure_adc(int val) /* Just stop the ADC */ data &= (~MSIC_ADC_START); } return intel_scu_ipc_iowrite8(MSIC_THERM_ADC1CNTL1, data); } Loading Loading @@ -275,7 +275,7 @@ static int set_up_therm_channel(u16 base_addr) return ret; /* 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, (MSIC_DIE_SENSOR_CODE | 0x10)); if (ret) Loading Loading @@ -462,7 +462,6 @@ static struct thermal_zone_device_ops tzd_ops = { .get_temp = read_curr_temp, }; /** * mid_thermal_probe - mfld thermal initialize * @pdev: platform device structure Loading Loading @@ -495,8 +494,7 @@ static int mid_thermal_probe(struct platform_device *pdev) /* Register each sensor with the generic thermal framework*/ for (i = 0; i < MSIC_THERMAL_SENSORS; i++) { pinfo->tzd[i] = thermal_zone_device_register(name[i], 0, initialize_sensor(i), &tzd_ops, 0, 0, 0, 0); 0, initialize_sensor(i), &tzd_ops, 0, 0, 0, 0); if (IS_ERR(pinfo->tzd[i])) goto reg_fail; } Loading Loading @@ -535,10 +533,6 @@ static int mid_thermal_remove(struct platform_device *pdev) return configure_adc(0); } /********************************************************************* * Driver initialisation and finalization *********************************************************************/ #define DRIVER_NAME "msic_sensor" static const struct platform_device_id therm_id_table[] = { Loading Loading
drivers/platform/x86/intel_mid_thermal.c +300 −306 Original line number Diff line number Diff line Loading @@ -51,7 +51,8 @@ #define MSIC_STOPBIT_MASK 16 #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) /* ADC channel code values */ Loading Loading @@ -245,7 +246,6 @@ static int configure_adc(int val) /* Just stop the ADC */ data &= (~MSIC_ADC_START); } return intel_scu_ipc_iowrite8(MSIC_THERM_ADC1CNTL1, data); } Loading Loading @@ -275,7 +275,7 @@ static int set_up_therm_channel(u16 base_addr) return ret; /* 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, (MSIC_DIE_SENSOR_CODE | 0x10)); if (ret) Loading Loading @@ -462,7 +462,6 @@ static struct thermal_zone_device_ops tzd_ops = { .get_temp = read_curr_temp, }; /** * mid_thermal_probe - mfld thermal initialize * @pdev: platform device structure Loading Loading @@ -495,8 +494,7 @@ static int mid_thermal_probe(struct platform_device *pdev) /* Register each sensor with the generic thermal framework*/ for (i = 0; i < MSIC_THERMAL_SENSORS; i++) { pinfo->tzd[i] = thermal_zone_device_register(name[i], 0, initialize_sensor(i), &tzd_ops, 0, 0, 0, 0); 0, initialize_sensor(i), &tzd_ops, 0, 0, 0, 0); if (IS_ERR(pinfo->tzd[i])) goto reg_fail; } Loading Loading @@ -535,10 +533,6 @@ static int mid_thermal_remove(struct platform_device *pdev) return configure_adc(0); } /********************************************************************* * Driver initialisation and finalization *********************************************************************/ #define DRIVER_NAME "msic_sensor" static const struct platform_device_id therm_id_table[] = { Loading