| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Freescale PowerQUICC Ethernet Driver -- MIIM bus implementation |
|---|
| 3 | 4 | * Provides Bus interface for MIIM regs |
|---|
| .. | .. |
|---|
| 8 | 9 | * Copyright 2002-2004, 2008-2009 Freescale Semiconductor, Inc. |
|---|
| 9 | 10 | * |
|---|
| 10 | 11 | * 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 | | - * |
|---|
| 17 | 12 | */ |
|---|
| 18 | 13 | |
|---|
| 19 | 14 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 446 | 441 | goto error; |
|---|
| 447 | 442 | } |
|---|
| 448 | 443 | |
|---|
| 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); |
|---|
| 451 | 446 | |
|---|
| 452 | 447 | priv->map = of_iomap(np, 0); |
|---|
| 453 | 448 | if (!priv->map) { |
|---|
| .. | .. |
|---|
| 473 | 468 | |
|---|
| 474 | 469 | if (data->get_tbipa) { |
|---|
| 475 | 470 | for_each_child_of_node(np, tbi) { |
|---|
| 476 | | - if (strcmp(tbi->type, "tbi-phy") == 0) { |
|---|
| 471 | + if (of_node_is_type(tbi, "tbi-phy")) { |
|---|
| 477 | 472 | dev_dbg(&pdev->dev, "found TBI PHY node %pOFP\n", |
|---|
| 478 | 473 | tbi); |
|---|
| 479 | 474 | break; |
|---|