Fix PCI device ID in fam15h_power driver

Fix suspend/resume behavior in pwm-fan driver
 Reduce logging noise created by ibmpowernv driver
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJUY7XwAAoJEMsfJm/On5mBxbgP/i1RSIYHEk/CRCtYV5tF8BIR
 06n3kTC4TC+RsQ60kRc6Vs1JwXW+jZWFTkI4wzYUNnAJCiv8jJRYwJnJSQD5xxz1
 uqTkcObJbhzMy2EiHlC+gSIFVIZkyAxJ2KEpfxf//lab2wOJESwJnQT2BQtOeJmI
 mEj0033r4fewu6G8rLs8pW6XTPvqjjEGQDiou30mtt5zUdYGouI2yo74E1JQ1n5z
 lKJgvblnQklW0kNsbpqEqhwETSZxjtl8WzKpsXymZIfL9K2zdN4GzcQ9MRXq8CHi
 yJuRVLGdt6WpPlyTqX007Sl91WYOLaxEc4Qtuf+O7hjwf675CeFOMhxwaRF/mFsA
 T60Y/9P1E9KnwNg3DNh91Wat6r6U+ArjqCW51mTfltkCwZMZpxTeD2NocGO51a3h
 DLk/9WA4zL3Dflcg/njCpeBOepseSD7orCLbVAsNUHLZu1e+GZw5PwFoWzWWN0yi
 PvDBFApBaf/34LSww+mPS8w8lo4VUmfVLqqFrdkbNukb7bM5M+Xt1S+0Iz6WNZUJ
 4sc5ZR8PxTR7eWt0DCUNS00ZyM3eMhOCiYUumNAgXdk0rXxK118YUrfFU+AvvFqt
 duXtECfxUtQsHIU5O46afU0d7w8bVMvbL7/+0Nl228hLhIyIhYtAxxfF9Jqt1c8j
 uFDPd/gAnX6Pe/PTcHZH
 =fKiG
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus-v3.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 - fix PCI device ID in fam15h_power driver
 - fix suspend/resume behavior in pwm-fan driver
 - reduce logging noise created by ibmpowernv driver

* tag 'hwmon-for-linus-v3.18-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (fam15h_power) Fix NB device ID for F16h M30h
  hwmon: (pwm-fan) Fix suspend/resume behavior
  hwmon: (ibmpowernv) Quieten when probing finds no device
This commit is contained in:
Linus Torvalds 2014-11-12 13:18:20 -08:00
commit de34b81bc2
3 changed files with 15 additions and 6 deletions

View File

@ -234,7 +234,7 @@ static const struct pci_device_id fam15h_power_id_table[] = {
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F4) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
{ PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F4) },
{}
};
MODULE_DEVICE_TABLE(pci, fam15h_power_id_table);

View File

@ -181,7 +181,7 @@ static int __init populate_attr_groups(struct platform_device *pdev)
opal = of_find_node_by_path("/ibm,opal/sensors");
if (!opal) {
dev_err(&pdev->dev, "Opal node 'sensors' not found\n");
dev_dbg(&pdev->dev, "Opal node 'sensors' not found\n");
return -ENODEV;
}
@ -335,7 +335,9 @@ static int __init ibmpowernv_init(void)
err = platform_driver_probe(&ibmpowernv_driver, ibmpowernv_probe);
if (err) {
pr_err("Platfrom driver probe failed\n");
if (err != -ENODEV)
pr_err("Platform driver probe failed (%d)\n", err);
goto exit_device_del;
}

View File

@ -161,10 +161,17 @@ static int pwm_fan_suspend(struct device *dev)
static int pwm_fan_resume(struct device *dev)
{
struct pwm_fan_ctx *ctx = dev_get_drvdata(dev);
unsigned long duty;
int ret;
if (ctx->pwm_value)
return pwm_enable(ctx->pwm);
return 0;
if (ctx->pwm_value == 0)
return 0;
duty = DIV_ROUND_UP(ctx->pwm_value * (ctx->pwm->period - 1), MAX_PWM);
ret = pwm_config(ctx->pwm, duty, ctx->pwm->period);
if (ret)
return ret;
return pwm_enable(ctx->pwm);
}
#endif