hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/net/ethernet/freescale/fsl_pq_mdio.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Freescale PowerQUICC Ethernet Driver -- MIIM bus implementation
34 * Provides Bus interface for MIIM regs
....@@ -8,12 +9,6 @@
89 * Copyright 2002-2004, 2008-2009 Freescale Semiconductor, Inc.
910 *
1011 * Based on gianfar_mii.c and ucc_geth_mii.c (Li Yang, Kim Phillips)
11
- *
12
- * This program is free software; you can redistribute it and/or modify it
13
- * under the terms of the GNU General Public License as published by the
14
- * Free Software Foundation; either version 2 of the License, or (at your
15
- * option) any later version.
16
- *
1712 */
1813
1914 #include <linux/kernel.h>
....@@ -446,8 +441,8 @@
446441 goto error;
447442 }
448443
449
- snprintf(new_bus->id, MII_BUS_ID_SIZE, "%s@%llx", np->name,
450
- (unsigned long long)res.start);
444
+ snprintf(new_bus->id, MII_BUS_ID_SIZE, "%pOFn@%llx", np,
445
+ (unsigned long long)res.start);
451446
452447 priv->map = of_iomap(np, 0);
453448 if (!priv->map) {
....@@ -473,7 +468,7 @@
473468
474469 if (data->get_tbipa) {
475470 for_each_child_of_node(np, tbi) {
476
- if (strcmp(tbi->type, "tbi-phy") == 0) {
471
+ if (of_node_is_type(tbi, "tbi-phy")) {
477472 dev_dbg(&pdev->dev, "found TBI PHY node %pOFP\n",
478473 tbi);
479474 break;