.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
---|
1 | 2 | /* envctrl.c: Temperature and Fan monitoring on Machines providing it. |
---|
2 | 3 | * |
---|
3 | 4 | * Copyright (C) 1998 Eddie C. Dost (ecd@skynet.be) |
---|
.. | .. |
---|
35 | 36 | |
---|
36 | 37 | #define DRIVER_NAME "envctrl" |
---|
37 | 38 | #define PFX DRIVER_NAME ": " |
---|
38 | | - |
---|
39 | | -#define ENVCTRL_MINOR 162 |
---|
40 | 39 | |
---|
41 | 40 | #define PCF8584_ADDRESS 0x55 |
---|
42 | 41 | |
---|
.. | .. |
---|
714 | 713 | .owner = THIS_MODULE, |
---|
715 | 714 | .read = envctrl_read, |
---|
716 | 715 | .unlocked_ioctl = envctrl_ioctl, |
---|
717 | | -#ifdef CONFIG_COMPAT |
---|
718 | | - .compat_ioctl = envctrl_ioctl, |
---|
719 | | -#endif |
---|
| 716 | + .compat_ioctl = compat_ptr_ioctl, |
---|
720 | 717 | .open = envctrl_open, |
---|
721 | 718 | .release = envctrl_release, |
---|
722 | 719 | .llseek = noop_llseek, |
---|
.. | .. |
---|
906 | 903 | int len; |
---|
907 | 904 | |
---|
908 | 905 | root_node = of_find_node_by_path("/"); |
---|
909 | | - if (!strcmp(root_node->name, "SUNW,UltraSPARC-IIi-cEngine")) { |
---|
| 906 | + if (of_node_name_eq(root_node, "SUNW,UltraSPARC-IIi-cEngine")) { |
---|
910 | 907 | for (len = 0; len < PCF8584_MAX_CHANNELS; ++len) { |
---|
911 | 908 | pchild->mon_type[len] = ENVCTRL_NOMON; |
---|
912 | 909 | } |
---|
.. | .. |
---|
1039 | 1036 | index = 0; |
---|
1040 | 1037 | dp = op->dev.of_node->child; |
---|
1041 | 1038 | while (dp) { |
---|
1042 | | - if (!strcmp(dp->name, "gpio")) { |
---|
| 1039 | + if (of_node_name_eq(dp, "gpio")) { |
---|
1043 | 1040 | i2c_childlist[index].i2ctype = I2C_GPIO; |
---|
1044 | 1041 | envctrl_init_i2c_child(dp, &(i2c_childlist[index++])); |
---|
1045 | | - } else if (!strcmp(dp->name, "adc")) { |
---|
| 1042 | + } else if (of_node_name_eq(dp, "adc")) { |
---|
1046 | 1043 | i2c_childlist[index].i2ctype = I2C_ADC; |
---|
1047 | 1044 | envctrl_init_i2c_child(dp, &(i2c_childlist[index++])); |
---|
1048 | 1045 | } |
---|