aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/macio_asic.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-11-16 16:11:01 -0600
committerMichael Ellerman <mpe@ellerman.id.au>2018-11-26 22:33:37 +1100
commitbf82d3758d4a075d17f4930c9872b05bd277ab0c (patch)
tree4d4d33f42e137a3a0601f9f3991d3c509d1cf3cd /drivers/macintosh/macio_asic.c
parent15b680c474afd54dac05530d8fed41c1e8d607e0 (diff)
downloadlinux-bf82d3758d4a075d17f4930c9872b05bd277ab0c.tar.gz
macintosh: Use device_type helpers to access the node type
Remove directly accessing device_node.type pointer and use the accessors instead. This will eventually allow removing the type pointer. Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'drivers/macintosh/macio_asic.c')
-rw-r--r--drivers/macintosh/macio_asic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index 17d3bc917562ed..bc8418801224fc 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -220,8 +220,8 @@ static int macio_resource_quirks(struct device_node *np, struct resource *res,
return 1;
/* Some older IDE resources have bogus sizes */
- if (!(strcmp(np->name, "IDE") && strcmp(np->name, "ATA") &&
- strcmp(np->type, "ide") && strcmp(np->type, "ata"))) {
+ if (!strcmp(np->name, "IDE") || !strcmp(np->name, "ATA") ||
+ of_node_is_type(np, "ide") || of_node_is_type(np, "ata")) {
if (index == 0 && (res->end - res->start) > 0xfff)
res->end = res->start + 0xfff;
if (index == 1 && (res->end - res->start) > 0xff)