blob: 83a9b9345f9050d8d61e0b20653b645ad7a30b21 [file] [log] [blame]
b.liue9582032025-04-17 19:18:16 +08001From 3b33438c52def0de4a5577ad541e50923bcc2596 Mon Sep 17 00:00:00 2001
2From: Paul Barker <pbarker@konsulko.com>
3Date: Thu, 3 Sep 2020 12:26:20 +0100
4Subject: [PATCH] net: dsa: b53: Use dev_{err,info} instead of pr_*
5
6This change allows us to see which device the err or info messages are
7referring to if we have multiple b53 compatible devices on a board.
8
9As this removes the only pr_*() calls in this file we can drop the
10definition of pr_fmt().
11
12Signed-off-by: Paul Barker <pbarker@konsulko.com>
13Signed-off-by: David S. Miller <davem@davemloft.net>
14---
15 drivers/net/dsa/b53/b53_common.c | 10 +++++-----
16 1 file changed, 5 insertions(+), 5 deletions(-)
17
18--- a/drivers/net/dsa/b53/b53_common.c
19+++ b/drivers/net/dsa/b53/b53_common.c
20@@ -17,8 +17,6 @@
21 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 */
23
24-#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
25-
26 #include <linux/delay.h>
27 #include <linux/export.h>
28 #include <linux/gpio.h>
29@@ -2616,8 +2614,9 @@ int b53_switch_detect(struct b53_device
30 dev->chip_id = id32;
31 break;
32 default:
33- pr_err("unsupported switch detected (BCM53%02x/BCM%x)\n",
34- id8, id32);
35+ dev_err(dev->dev,
36+ "unsupported switch detected (BCM53%02x/BCM%x)\n",
37+ id8, id32);
38 return -ENODEV;
39 }
40 }
41@@ -2647,7 +2646,8 @@ int b53_switch_register(struct b53_devic
42 if (ret)
43 return ret;
44
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);
48
49 return dsa_register_switch(dev->ds);
50 }