Skip to content

Commit

Permalink
hwmon: (ibmpowernv) Quieten when probing finds no device
Browse files Browse the repository at this point in the history
Because we build kernels with drivers built in for many platforms, it's
normal for the ibmpowernv driver to be loaded on systems that don't have
the appropriate hardware.

Currently the driver spams the log with:

  ibmpowernv ibmpowernv.0: Opal node 'sensors' not found
  ibmpowernv: Platfrom driver probe failed

But there is no error, this machine is not a powernv and doesn't have
the hardware. So change the sensors message to dev_dbg(), and only print
an error about the probe failing if it's not ENODEV.

Also fix the spelling of "Platfrom" and print the actual error value.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
  • Loading branch information
Michael Ellerman authored and Guenter Roeck committed Nov 11, 2014
1 parent 206c5f6 commit aab18da
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/hwmon/ibmpowernv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit aab18da

Please sign in to comment.