static int tmp102_temp_sensor_read_temp(struct device *dev, struct device_attribute *devattr, char *buf) { int temp = tmp102_read_current_temp(dev); return sprintf(buf, "%d\n", temp); }
static int tmp102_get_temp(struct thermal_dev *tdev) { struct platform_device *pdev = to_platform_device(tdev->dev); struct tmp102_temp_sensor *tmp102 = platform_get_drvdata(pdev); tmp102->therm_fw->current_temp = tmp102_read_current_temp(tdev->dev); return tmp102->therm_fw->current_temp; }
static int tmp102_get_temp(struct thermal_dev *tdev) { struct platform_device *pdev = to_platform_device(tdev->dev); struct tmp102_temp_sensor *tmp102 = platform_get_drvdata(pdev); #ifdef CONFIG_THERMAL_DEBUG printk(KERN_DEBUG "%s\n", __func__); #endif tmp102->therm_fw->current_temp = tmp102_read_current_temp(tdev->dev); return tmp102->therm_fw->current_temp; }