-@@ -132,6 +133,9 @@ struct tc654_data {
- * writable register used to control the duty
- * cycle of the V OUT output.
- */
-+
-+ /* optional cooling device */
-+ struct thermal_cooling_device *cdev;
- };
-
- /* helper to grab and cache data, at most one time per second */
-@@ -367,36 +371,30 @@ static ssize_t pwm_mode_store(struct dev
- static const int tc654_pwm_map[16] = { 77, 88, 102, 112, 124, 136, 148, 160,
- 172, 184, 196, 207, 219, 231, 243, 255};
-
-+static int get_pwm(struct tc654_data *data)
-+{
-+ if (data->config & TC654_REG_CONFIG_SDM)
-+ return 0;
-+ else
-+ return tc654_pwm_map[data->duty_cycle];
-+}
-+
- static ssize_t pwm_show(struct device *dev, struct device_attribute *da,
- char *buf)
- {
- struct tc654_data *data = tc654_update_client(dev);
-- int pwm;
-
- if (IS_ERR(data))
- return PTR_ERR(data);
-
-- if (data->config & TC654_REG_CONFIG_SDM)
-- pwm = 0;
-- else
-- pwm = tc654_pwm_map[data->duty_cycle];
--
-- return sprintf(buf, "%d\n", pwm);
-+ return sprintf(buf, "%d\n", get_pwm(data));