hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/drivers/ide/pmac.c
....@@ -1,3 +1,4 @@
1
+// SPDX-License-Identifier: GPL-2.0-or-later
12 /*
23 * Support for IDE interfaces on PowerMacs.
34 *
....@@ -7,11 +8,6 @@
78 * Copyright (C) 1998-2003 Paul Mackerras & Ben. Herrenschmidt
89 * Copyright (C) 2007-2008 Bartlomiej Zolnierkiewicz
910 *
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
- *
1511 * Some code taken from drivers/ide/ide-dma.c:
1612 *
1713 * Copyright (c) 1995-1998 Mark Lord
....@@ -20,7 +16,6 @@
2016 * get rid of the "rounded" tables used previously, so we have the
2117 * same table format for all controllers and can then just have one
2218 * big table
23
- *
2419 */
2520 #include <linux/types.h>
2621 #include <linux/kernel.h>
....@@ -1024,7 +1019,6 @@
10241019 struct device_node *np = pmif->node;
10251020 const int *bidp;
10261021 struct ide_host *host;
1027
- ide_hwif_t *hwif;
10281022 struct ide_hw *hws[] = { hw };
10291023 struct ide_port_info d = pmac_port_info;
10301024 int rc;
....@@ -1046,7 +1040,7 @@
10461040 d.port_ops = &pmac_ide_ata4_port_ops;
10471041 d.udma_mask = ATA_UDMA5;
10481042 } 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")) {
10501044 pmif->kind = controller_kl_ata4;
10511045 d.port_ops = &pmac_ide_ata4_port_ops;
10521046 d.udma_mask = ATA_UDMA4;
....@@ -1080,7 +1074,7 @@
10801074 rc = -ENOMEM;
10811075 goto bail;
10821076 }
1083
- hwif = pmif->hwif = host->ports[0];
1077
+ pmif->hwif = host->ports[0];
10841078
10851079 if (on_media_bay(pmif)) {
10861080 /* Fixup bus ID for media bay */