1 From 3b33438c52def0de4a5577ad541e50923bcc2596 Mon Sep 17 00:00:00 2001
2 From: Paul Barker <pbarker@konsulko.com>
3 Date: Thu, 3 Sep 2020 12:26:20 +0100
4 Subject: [PATCH] net: dsa: b53: Use dev_{err,info} instead of pr_*
6 This change allows us to see which device the err or info messages are
7 referring to if we have multiple b53 compatible devices on a board.
9 As this removes the only pr_*() calls in this file we can drop the
10 definition of pr_fmt().
12 Signed-off-by: Paul Barker <pbarker@konsulko.com>
13 Signed-off-by: David S. Miller <davem@davemloft.net>
15 drivers/net/dsa/b53/b53_common.c | 10 +++++-----
16 1 file changed, 5 insertions(+), 5 deletions(-)
18 --- a/drivers/net/dsa/b53/b53_common.c
19 +++ b/drivers/net/dsa/b53/b53_common.c
21 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
24 -#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
26 #include <linux/delay.h>
27 #include <linux/export.h>
28 #include <linux/gpio.h>
29 @@ -2475,8 +2473,9 @@ int b53_switch_detect(struct b53_device
33 - pr_err("unsupported switch detected (BCM53%02x/BCM%x)\n",
36 + "unsupported switch detected (BCM53%02x/BCM%x)\n",
41 @@ -2506,7 +2505,8 @@ int b53_switch_register(struct b53_devic
45 - pr_info("found switch: %s, rev %i\n", dev->name, dev->core_rev);
46 + dev_info(dev->dev, "found switch: %s, rev %i\n",
47 + dev->name, dev->core_rev);
49 return dsa_register_switch(dev->ds);