Commit ea3ba10f authored by Frieder Schrempf's avatar Frieder Schrempf Committed by Greg Kroah-Hartman

usb: misc: onboard_usb_hub: Print symbolic error names

Instead of printing the decimal error codes, let's use the more
human-readable symbolic error names provided by the %pe printk
format specifier.
Signed-off-by: default avatarFrieder Schrempf <frieder.schrempf@kontron.de>
Link: https://lore.kernel.org/r/20231127112234.109073-1-frieder@fris.deSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 3396b337
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/export.h> #include <linux/export.h>
#include <linux/err.h>
#include <linux/gpio/consumer.h> #include <linux/gpio/consumer.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/kernel.h> #include <linux/kernel.h>
...@@ -68,7 +69,7 @@ static int onboard_hub_power_on(struct onboard_hub *hub) ...@@ -68,7 +69,7 @@ static int onboard_hub_power_on(struct onboard_hub *hub)
err = regulator_bulk_enable(hub->pdata->num_supplies, hub->supplies); err = regulator_bulk_enable(hub->pdata->num_supplies, hub->supplies);
if (err) { if (err) {
dev_err(hub->dev, "failed to enable supplies: %d\n", err); dev_err(hub->dev, "failed to enable supplies: %pe\n", ERR_PTR(err));
return err; return err;
} }
...@@ -88,7 +89,7 @@ static int onboard_hub_power_off(struct onboard_hub *hub) ...@@ -88,7 +89,7 @@ static int onboard_hub_power_off(struct onboard_hub *hub)
err = regulator_bulk_disable(hub->pdata->num_supplies, hub->supplies); err = regulator_bulk_disable(hub->pdata->num_supplies, hub->supplies);
if (err) { if (err) {
dev_err(hub->dev, "failed to disable supplies: %d\n", err); dev_err(hub->dev, "failed to disable supplies: %pe\n", ERR_PTR(err));
return err; return err;
} }
...@@ -235,7 +236,7 @@ static void onboard_hub_attach_usb_driver(struct work_struct *work) ...@@ -235,7 +236,7 @@ static void onboard_hub_attach_usb_driver(struct work_struct *work)
err = driver_attach(&onboard_hub_usbdev_driver.drvwrap.driver); err = driver_attach(&onboard_hub_usbdev_driver.drvwrap.driver);
if (err) if (err)
pr_err("Failed to attach USB driver: %d\n", err); pr_err("Failed to attach USB driver: %pe\n", ERR_PTR(err));
} }
static int onboard_hub_probe(struct platform_device *pdev) static int onboard_hub_probe(struct platform_device *pdev)
...@@ -262,7 +263,7 @@ static int onboard_hub_probe(struct platform_device *pdev) ...@@ -262,7 +263,7 @@ static int onboard_hub_probe(struct platform_device *pdev)
err = devm_regulator_bulk_get(dev, hub->pdata->num_supplies, hub->supplies); err = devm_regulator_bulk_get(dev, hub->pdata->num_supplies, hub->supplies);
if (err) { if (err) {
dev_err(dev, "Failed to get regulator supplies: %d\n", err); dev_err(dev, "Failed to get regulator supplies: %pe\n", ERR_PTR(err));
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment