| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Support for IDE interfaces on PowerMacs. |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 7 | 8 | * Copyright (C) 1998-2003 Paul Mackerras & Ben. Herrenschmidt |
|---|
| 8 | 9 | * Copyright (C) 2007-2008 Bartlomiej Zolnierkiewicz |
|---|
| 9 | 10 | * |
|---|
| 10 | | - * This program is free software; you can redistribute it and/or |
|---|
| 11 | | - * modify it under the terms of the GNU General Public License |
|---|
| 12 | | - * as published by the Free Software Foundation; either version |
|---|
| 13 | | - * 2 of the License, or (at your option) any later version. |
|---|
| 14 | | - * |
|---|
| 15 | 11 | * Some code taken from drivers/ide/ide-dma.c: |
|---|
| 16 | 12 | * |
|---|
| 17 | 13 | * Copyright (c) 1995-1998 Mark Lord |
|---|
| .. | .. |
|---|
| 20 | 16 | * get rid of the "rounded" tables used previously, so we have the |
|---|
| 21 | 17 | * same table format for all controllers and can then just have one |
|---|
| 22 | 18 | * big table |
|---|
| 23 | | - * |
|---|
| 24 | 19 | */ |
|---|
| 25 | 20 | #include <linux/types.h> |
|---|
| 26 | 21 | #include <linux/kernel.h> |
|---|
| .. | .. |
|---|
| 1024 | 1019 | struct device_node *np = pmif->node; |
|---|
| 1025 | 1020 | const int *bidp; |
|---|
| 1026 | 1021 | struct ide_host *host; |
|---|
| 1027 | | - ide_hwif_t *hwif; |
|---|
| 1028 | 1022 | struct ide_hw *hws[] = { hw }; |
|---|
| 1029 | 1023 | struct ide_port_info d = pmac_port_info; |
|---|
| 1030 | 1024 | int rc; |
|---|
| .. | .. |
|---|
| 1046 | 1040 | d.port_ops = &pmac_ide_ata4_port_ops; |
|---|
| 1047 | 1041 | d.udma_mask = ATA_UDMA5; |
|---|
| 1048 | 1042 | } else if (of_device_is_compatible(np, "keylargo-ata")) { |
|---|
| 1049 | | - if (strcmp(np->name, "ata-4") == 0) { |
|---|
| 1043 | + if (of_node_name_eq(np, "ata-4")) { |
|---|
| 1050 | 1044 | pmif->kind = controller_kl_ata4; |
|---|
| 1051 | 1045 | d.port_ops = &pmac_ide_ata4_port_ops; |
|---|
| 1052 | 1046 | d.udma_mask = ATA_UDMA4; |
|---|
| .. | .. |
|---|
| 1080 | 1074 | rc = -ENOMEM; |
|---|
| 1081 | 1075 | goto bail; |
|---|
| 1082 | 1076 | } |
|---|
| 1083 | | - hwif = pmif->hwif = host->ports[0]; |
|---|
| 1077 | + pmif->hwif = host->ports[0]; |
|---|
| 1084 | 1078 | |
|---|
| 1085 | 1079 | if (on_media_bay(pmif)) { |
|---|
| 1086 | 1080 | /* Fixup bus ID for media bay */ |
|---|