Commit 821d9e1d authored by Henning Schild's avatar Henning Schild Committed by Hans de Goede

gpio-f7188x: switch over to using pr_fmt

Subsequent patches will touch that file, apply some nice to have style
changes before actually adding functional changes.
Signed-off-by: default avatarHenning Schild <henning.schild@siemens.com>
Reviewed-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: default avatarSimon Guinot <simon.guinot@sequanux.org>
Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Acked-by: default avatarBartosz Golaszewski <brgl@bgdev.pl>
Link: https://lore.kernel.org/r/20220825104422.14156-2-henning.schild@siemens.comSigned-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 568035b0
...@@ -7,6 +7,9 @@ ...@@ -7,6 +7,9 @@
* Author: Simon Guinot <simon.guinot@sequanux.org> * Author: Simon Guinot <simon.guinot@sequanux.org>
*/ */
#define DRVNAME "gpio-f7188x"
#define pr_fmt(fmt) DRVNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/init.h> #include <linux/init.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
...@@ -14,8 +17,6 @@ ...@@ -14,8 +17,6 @@
#include <linux/gpio/driver.h> #include <linux/gpio/driver.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#define DRVNAME "gpio-f7188x"
/* /*
* Super-I/O registers * Super-I/O registers
*/ */
...@@ -110,7 +111,7 @@ static inline int superio_enter(int base) ...@@ -110,7 +111,7 @@ static inline int superio_enter(int base)
{ {
/* Don't step on other drivers' I/O space by accident. */ /* Don't step on other drivers' I/O space by accident. */
if (!request_muxed_region(base, 2, DRVNAME)) { if (!request_muxed_region(base, 2, DRVNAME)) {
pr_err(DRVNAME "I/O address 0x%04x already in use\n", base); pr_err("I/O address 0x%04x already in use\n", base);
return -EBUSY; return -EBUSY;
} }
...@@ -487,7 +488,7 @@ static int __init f7188x_find(int addr, struct f7188x_sio *sio) ...@@ -487,7 +488,7 @@ static int __init f7188x_find(int addr, struct f7188x_sio *sio)
err = -ENODEV; err = -ENODEV;
devid = superio_inw(addr, SIO_MANID); devid = superio_inw(addr, SIO_MANID);
if (devid != SIO_FINTEK_ID) { if (devid != SIO_FINTEK_ID) {
pr_debug(DRVNAME ": Not a Fintek device at 0x%08x\n", addr); pr_debug("Not a Fintek device at 0x%08x\n", addr);
goto err; goto err;
} }
...@@ -518,13 +519,13 @@ static int __init f7188x_find(int addr, struct f7188x_sio *sio) ...@@ -518,13 +519,13 @@ static int __init f7188x_find(int addr, struct f7188x_sio *sio)
sio->type = f81865; sio->type = f81865;
break; break;
default: default:
pr_info(DRVNAME ": Unsupported Fintek device 0x%04x\n", devid); pr_info("Unsupported Fintek device 0x%04x\n", devid);
goto err; goto err;
} }
sio->addr = addr; sio->addr = addr;
err = 0; err = 0;
pr_info(DRVNAME ": Found %s at %#x, revision %d\n", pr_info("Found %s at %#x, revision %d\n",
f7188x_names[sio->type], f7188x_names[sio->type],
(unsigned int) addr, (unsigned int) addr,
(int) superio_inb(addr, SIO_DEVREV)); (int) superio_inb(addr, SIO_DEVREV));
...@@ -548,13 +549,13 @@ f7188x_gpio_device_add(const struct f7188x_sio *sio) ...@@ -548,13 +549,13 @@ f7188x_gpio_device_add(const struct f7188x_sio *sio)
err = platform_device_add_data(f7188x_gpio_pdev, err = platform_device_add_data(f7188x_gpio_pdev,
sio, sizeof(*sio)); sio, sizeof(*sio));
if (err) { if (err) {
pr_err(DRVNAME "Platform data allocation failed\n"); pr_err("Platform data allocation failed\n");
goto err; goto err;
} }
err = platform_device_add(f7188x_gpio_pdev); err = platform_device_add(f7188x_gpio_pdev);
if (err) { if (err) {
pr_err(DRVNAME "Device addition failed\n"); pr_err("Device addition failed\n");
goto err; goto 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