diff options
Diffstat (limited to 'drivers/hwmon/pwm-fan.c')
-rw-r--r-- | drivers/hwmon/pwm-fan.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index 7da6a160d45a..2c944825026f 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c | |||
@@ -72,8 +72,8 @@ static void pwm_fan_update_state(struct pwm_fan_ctx *ctx, unsigned long pwm) | |||
72 | ctx->pwm_fan_state = i; | 72 | ctx->pwm_fan_state = i; |
73 | } | 73 | } |
74 | 74 | ||
75 | static ssize_t set_pwm(struct device *dev, struct device_attribute *attr, | 75 | static ssize_t pwm_store(struct device *dev, struct device_attribute *attr, |
76 | const char *buf, size_t count) | 76 | const char *buf, size_t count) |
77 | { | 77 | { |
78 | struct pwm_fan_ctx *ctx = dev_get_drvdata(dev); | 78 | struct pwm_fan_ctx *ctx = dev_get_drvdata(dev); |
79 | unsigned long pwm; | 79 | unsigned long pwm; |
@@ -90,8 +90,8 @@ static ssize_t set_pwm(struct device *dev, struct device_attribute *attr, | |||
90 | return count; | 90 | return count; |
91 | } | 91 | } |
92 | 92 | ||
93 | static ssize_t show_pwm(struct device *dev, | 93 | static ssize_t pwm_show(struct device *dev, struct device_attribute *attr, |
94 | struct device_attribute *attr, char *buf) | 94 | char *buf) |
95 | { | 95 | { |
96 | struct pwm_fan_ctx *ctx = dev_get_drvdata(dev); | 96 | struct pwm_fan_ctx *ctx = dev_get_drvdata(dev); |
97 | 97 | ||
@@ -99,7 +99,7 @@ static ssize_t show_pwm(struct device *dev, | |||
99 | } | 99 | } |
100 | 100 | ||
101 | 101 | ||
102 | static SENSOR_DEVICE_ATTR(pwm1, S_IRUGO | S_IWUSR, show_pwm, set_pwm, 0); | 102 | static SENSOR_DEVICE_ATTR_RW(pwm1, pwm, 0); |
103 | 103 | ||
104 | static struct attribute *pwm_fan_attrs[] = { | 104 | static struct attribute *pwm_fan_attrs[] = { |
105 | &sensor_dev_attr_pwm1.dev_attr.attr, | 105 | &sensor_dev_attr_pwm1.dev_attr.attr, |