diff options
Diffstat (limited to 'drivers/sbus/char/bbc_envctrl.c')
| -rw-r--r-- | drivers/sbus/char/bbc_envctrl.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/sbus/char/bbc_envctrl.c b/drivers/sbus/char/bbc_envctrl.c index 228c782d6433..23af4edd295b 100644 --- a/drivers/sbus/char/bbc_envctrl.c +++ b/drivers/sbus/char/bbc_envctrl.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0 /* bbc_envctrl.c: UltraSPARC-III environment control driver. * * Copyright (C) 2001, 2008 David S. Miller (davem@davemloft.net) @@ -8,8 +9,8 @@ #include <linux/kmod.h> #include <linux/reboot.h> #include <linux/of.h> +#include <linux/platform_device.h> #include <linux/slab.h> -#include <linux/of_device.h> #include <asm/oplib.h> #include "bbc_i2c.h" @@ -570,9 +571,9 @@ int bbc_envctrl_init(struct bbc_i2c_bus *bp) int devidx = 0; while ((op = bbc_i2c_getdev(bp, devidx++)) != NULL) { - if (!strcmp(op->dev.of_node->name, "temperature")) + if (of_node_name_eq(op->dev.of_node, "temperature")) attach_one_temp(bp, op, temp_index++); - if (!strcmp(op->dev.of_node->name, "fan-control")) + if (of_node_name_eq(op->dev.of_node, "fan-control")) attach_one_fan(bp, op, fan_index++); } if (temp_index != 0 && fan_index != 0) { |
