diff options
-rw-r--r-- | drivers/hwmon/fam15h_power.c | 2 | ||||
-rw-r--r-- | drivers/hwmon/ibmpowernv.c | 6 | ||||
-rw-r--r-- | drivers/hwmon/pwm-fan.c | 13 |
3 files changed, 15 insertions, 6 deletions
diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c index fcdbde4ec692..3057dfc7e3bc 100644 --- a/drivers/hwmon/fam15h_power.c +++ b/drivers/hwmon/fam15h_power.c | |||
@@ -234,7 +234,7 @@ static const struct pci_device_id fam15h_power_id_table[] = { | |||
234 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, | 234 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, |
235 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F4) }, | 235 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F4) }, |
236 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) }, | 236 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) }, |
237 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) }, | 237 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F4) }, |
238 | {} | 238 | {} |
239 | }; | 239 | }; |
240 | MODULE_DEVICE_TABLE(pci, fam15h_power_id_table); | 240 | MODULE_DEVICE_TABLE(pci, fam15h_power_id_table); |
diff --git a/drivers/hwmon/ibmpowernv.c b/drivers/hwmon/ibmpowernv.c index d2bf2c97ae70..6a30eeea94be 100644 --- a/drivers/hwmon/ibmpowernv.c +++ b/drivers/hwmon/ibmpowernv.c | |||
@@ -181,7 +181,7 @@ static int __init populate_attr_groups(struct platform_device *pdev) | |||
181 | 181 | ||
182 | opal = of_find_node_by_path("/ibm,opal/sensors"); | 182 | opal = of_find_node_by_path("/ibm,opal/sensors"); |
183 | if (!opal) { | 183 | if (!opal) { |
184 | dev_err(&pdev->dev, "Opal node 'sensors' not found\n"); | 184 | dev_dbg(&pdev->dev, "Opal node 'sensors' not found\n"); |
185 | return -ENODEV; | 185 | return -ENODEV; |
186 | } | 186 | } |
187 | 187 | ||
@@ -335,7 +335,9 @@ static int __init ibmpowernv_init(void) | |||
335 | 335 | ||
336 | err = platform_driver_probe(&ibmpowernv_driver, ibmpowernv_probe); | 336 | err = platform_driver_probe(&ibmpowernv_driver, ibmpowernv_probe); |
337 | if (err) { | 337 | if (err) { |
338 | pr_err("Platfrom driver probe failed\n"); | 338 | if (err != -ENODEV) |
339 | pr_err("Platform driver probe failed (%d)\n", err); | ||
340 | |||
339 | goto exit_device_del; | 341 | goto exit_device_del; |
340 | } | 342 | } |
341 | 343 | ||
diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index 823c877a1ec0..1991d9032c38 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c | |||
@@ -161,10 +161,17 @@ static int pwm_fan_suspend(struct device *dev) | |||
161 | static int pwm_fan_resume(struct device *dev) | 161 | static int pwm_fan_resume(struct device *dev) |
162 | { | 162 | { |
163 | struct pwm_fan_ctx *ctx = dev_get_drvdata(dev); | 163 | struct pwm_fan_ctx *ctx = dev_get_drvdata(dev); |
164 | unsigned long duty; | ||
165 | int ret; | ||
164 | 166 | ||
165 | if (ctx->pwm_value) | 167 | if (ctx->pwm_value == 0) |
166 | return pwm_enable(ctx->pwm); | 168 | return 0; |
167 | return 0; | 169 | |
170 | duty = DIV_ROUND_UP(ctx->pwm_value * (ctx->pwm->period - 1), MAX_PWM); | ||
171 | ret = pwm_config(ctx->pwm, duty, ctx->pwm->period); | ||
172 | if (ret) | ||
173 | return ret; | ||
174 | return pwm_enable(ctx->pwm); | ||
168 | } | 175 | } |
169 | #endif | 176 | #endif |
170 | 177 | ||