]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
[POWERPC] Rename get_property to of_get_property: partial drivers
authorStephen Rothwell <sfr@canb.auug.org.au>
Fri, 27 Apr 2007 03:41:15 +0000 (13:41 +1000)
committerPaul Mackerras <paulus@samba.org>
Fri, 27 Apr 2007 05:51:56 +0000 (15:51 +1000)
This does drivers/machintosh and the hvc code.

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
18 files changed:
drivers/char/hvc_iseries.c
drivers/char/hvc_vio.c
drivers/char/hvsi.c
drivers/macintosh/macio_asic.c
drivers/macintosh/macio_sysfs.c
drivers/macintosh/rack-meter.c
drivers/macintosh/smu.c
drivers/macintosh/therm_adt746x.c
drivers/macintosh/therm_pm72.c
drivers/macintosh/therm_windtunnel.c
drivers/macintosh/via-cuda.c
drivers/macintosh/via-pmu-led.c
drivers/macintosh/via-pmu.c
drivers/macintosh/windfarm_lm75_sensor.c
drivers/macintosh/windfarm_max6690_sensor.c
drivers/macintosh/windfarm_smu_controls.c
drivers/macintosh/windfarm_smu_sat.c
drivers/macintosh/windfarm_smu_sensors.c

index f144a947bd17aaa8549230e307c13def30296822..ec420fe8a9089f5a2f4be1201b6dbd5d7307fb8c 100644 (file)
@@ -575,7 +575,7 @@ static int hvc_find_vtys(void)
                                (num_found >= VTTY_PORTS))
                        break;
 
-               vtermno = get_property(vty, "reg", NULL);
+               vtermno = of_get_property(vty, "reg", NULL);
                if (!vtermno)
                        continue;
 
index f9c00844d2bfe9250448e0436421085f4b220d8a..94a542e20efb02eb07beb1266567e444b396219f 100644 (file)
@@ -153,7 +153,7 @@ static int hvc_find_vtys(void)
                if (num_found >= MAX_NR_HVC_CONSOLES)
                        break;
 
-               vtermno = get_property(vty, "reg", NULL);
+               vtermno = of_get_property(vty, "reg", NULL);
                if (!vtermno)
                        continue;
 
index 50315d6364fdd98727133c9fa7930ea0aa755d0f..d5a752da322f855261a06c9aacb93636fb57d1f9 100644 (file)
@@ -1279,8 +1279,8 @@ static int __init hvsi_console_init(void)
                struct hvsi_struct *hp;
                const uint32_t *vtermno, *irq;
 
-               vtermno = get_property(vty, "reg", NULL);
-               irq = get_property(vty, "interrupts", NULL);
+               vtermno = of_get_property(vty, "reg", NULL);
+               irq = of_get_property(vty, "interrupts", NULL);
                if (!vtermno || !irq)
                        continue;
 
index e851266a2db1b37fa400c1143ee4ccea72789c3f..c96b7fe882a450ccfaae4d9fe8c6d0c084077876 100644 (file)
@@ -395,7 +395,7 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
 #endif
                        MAX_NODE_NAME_SIZE, np->name);
        } else {
-               reg = get_property(np, "reg", NULL);
+               reg = of_get_property(np, "reg", NULL);
                sprintf(dev->ofdev.dev.bus_id, "%1d.%08x:%.*s",
                        chip->lbus.index,
                        reg ? *reg : 0, MAX_NODE_NAME_SIZE, np->name);
index 0a5647fb85694cf643093283b162b7a0b35c1b17..cc8267912656363a5e50545a3430b8523d09fcaa 100644 (file)
@@ -21,7 +21,7 @@ compatible_show (struct device *dev, struct device_attribute *attr, char *buf)
        int length = 0;
 
        of = &to_macio_device (dev)->ofdev;
-       compat = get_property(of->node, "compatible", &cplen);
+       compat = of_get_property(of->node, "compatible", &cplen);
        if (!compat) {
                *buf = '\0';
                return 0;
@@ -47,7 +47,7 @@ static ssize_t modalias_show (struct device *dev, struct device_attribute *attr,
        int length;
 
        of = &to_macio_device (dev)->ofdev;
-       compat = get_property(of->node, "compatible", &cplen);
+       compat = of_get_property(of->node, "compatible", &cplen);
        if (!compat) compat = "", cplen = 1;
        length = sprintf (buf, "of:N%sT%s", of->node->name, of->node->type);
        buf += length;
index f83fad2a3ff451ec8702e9048f94521cf56a1c98..4177ff004753299152a4d79471b784184eb7efdb 100644 (file)
@@ -387,7 +387,7 @@ static int __devinit rackmeter_probe(struct macio_dev* mdev,
               if (strcmp(np->name, "lightshow") == 0)
                       break;
               if ((strcmp(np->name, "sound") == 0) &&
-                  get_property(np, "virtual", NULL) != NULL)
+                  of_get_property(np, "virtual", NULL) != NULL)
                       break;
        }
        if (np == NULL) {
index 45bb3c1dfeb12fd9b58a337fff8bbcef22c9b4aa..135f22eb1ad4bc8500ddc7a38c3023cac882ed52 100644 (file)
@@ -491,7 +491,7 @@ int __init smu_init (void)
                printk(KERN_ERR "SMU: Can't find doorbell GPIO !\n");
                goto fail;
        }
-       data = get_property(smu->db_node, "reg", NULL);
+       data = of_get_property(smu->db_node, "reg", NULL);
        if (data == NULL) {
                of_node_put(smu->db_node);
                smu->db_node = NULL;
@@ -512,7 +512,7 @@ int __init smu_init (void)
                smu->msg_node = of_find_node_by_name(NULL, "smu-interrupt");
                if (smu->msg_node == NULL)
                        break;
-               data = get_property(smu->msg_node, "reg", NULL);
+               data = of_get_property(smu->msg_node, "reg", NULL);
                if (data == NULL) {
                        of_node_put(smu->msg_node);
                        smu->msg_node = NULL;
@@ -1004,7 +1004,7 @@ const struct smu_sdbp_header *__smu_get_sdb_partition(int id,
        } else
                mutex_lock(&smu_part_access);
 
-       part = get_property(smu->of_node, pname, size);
+       part = of_get_property(smu->of_node, pname, size);
        if (part == NULL) {
                DPRINTK("trying to extract from SMU ...\n");
                part = smu_create_sdb_partition(id);
index a7ce559266380596a045657ed14ae12efd4f5bb6..228903403cfcf78334184cf5aa3df2f99285a706 100644 (file)
@@ -567,13 +567,13 @@ thermostat_init(void)
        else
                return -ENODEV;
 
-       prop = get_property(np, "hwsensor-params-version", NULL);
+       prop = of_get_property(np, "hwsensor-params-version", NULL);
        printk(KERN_INFO "adt746x: version %d (%ssupported)\n", *prop,
                         (*prop == 1)?"":"un");
        if (*prop != 1)
                return -ENODEV;
 
-       prop = get_property(np, "reg", NULL);
+       prop = of_get_property(np, "reg", NULL);
        if (!prop)
                return -ENODEV;
 
@@ -591,9 +591,9 @@ thermostat_init(void)
                         "limit_adjust: %d, fan_speed: %d\n",
                         therm_bus, therm_address, limit_adjust, fan_speed);
 
-       if (get_property(np, "hwsensor-location", NULL)) {
+       if (of_get_property(np, "hwsensor-location", NULL)) {
                for (i = 0; i < 3; i++) {
-                       sensor_location[i] = get_property(np,
+                       sensor_location[i] = of_get_property(np,
                                        "hwsensor-location", NULL) + offset;
 
                        if (sensor_location[i] == NULL)
index 2e4ad44a863640424745e711f5bd73b0a5703af6..78ff186171393eaac54f54fe00a1aef4b7c276df 100644 (file)
@@ -674,7 +674,7 @@ static int read_eeprom(int cpu, struct mpu_data *out)
                printk(KERN_ERR "therm_pm72: Failed to retrieve cpuid node from device-tree\n");
                return -ENODEV;
        }
-       data = get_property(np, "cpuid", &len);
+       data = of_get_property(np, "cpuid", &len);
        if (data == NULL) {
                printk(KERN_ERR "therm_pm72: Failed to retrieve cpuid property from device-tree\n");
                of_node_put(np);
@@ -1337,7 +1337,7 @@ static int init_backside_state(struct backside_pid_state *state)
         */
        u3 = of_find_node_by_path("/u3@0,f8000000");
        if (u3 != NULL) {
-               const u32 *vers = get_property(u3, "device-rev", NULL);
+               const u32 *vers = of_get_property(u3, "device-rev", NULL);
                if (vers)
                        if (((*vers) & 0x3f) < 0x34)
                                u3h = 0;
@@ -2129,8 +2129,8 @@ static void fcu_lookup_fans(struct device_node *fcu_node)
                        continue;
 
                /* Lookup for a matching location */
-               loc = get_property(np, "location", NULL);
-               reg = get_property(np, "reg", NULL);
+               loc = of_get_property(np, "location", NULL);
+               reg = of_get_property(np, "reg", NULL);
                if (loc == NULL || reg == NULL)
                        continue;
                DBG(" matching location: %s, reg: 0x%08x\n", loc, *reg);
index a1d3a987cb3acad619ed55adcc3b2d1752b9091b..35233de460ad7f6e574b552c710ea10b0867abae 100644 (file)
@@ -492,7 +492,7 @@ g4fan_init( void )
 
        if( !(np=of_find_node_by_name(NULL, "power-mgt")) )
                return -ENODEV;
-       info = get_property(np, "thermal-info", NULL);
+       info = of_get_property(np, "thermal-info", NULL);
        of_node_put(np);
 
        if( !info || !machine_is_compatible("PowerMac3,6") )
index d58fcf6cca0aec41f68344f9cf99e880193ba9da..76d21775fc35b8362dec4ce9dbd694d1d468b5b6 100644 (file)
@@ -131,7 +131,7 @@ int __init find_via_cuda(void)
     if (vias == 0)
        return 0;
 
-    reg = get_property(vias, "reg", NULL);
+    reg = of_get_property(vias, "reg", NULL);
     if (reg == NULL) {
            printk(KERN_ERR "via-cuda: No \"reg\" property !\n");
            goto fail;
index f8d7a460c9a8a3471dd38cd4811e2dfa18bcc8cb..fc89a7047cd0b0a24925e9ec97d86efcb81e1a32 100644 (file)
@@ -118,7 +118,7 @@ static int __init via_pmu_led_init(void)
        dt = of_find_node_by_path("/");
        if (dt == NULL)
                return -ENODEV;
-       model = get_property(dt, "model", NULL);
+       model = of_get_property(dt, "model", NULL);
        if (model == NULL)
                return -ENODEV;
        if (strncmp(model, "PowerBook", strlen("PowerBook")) != 0 &&
index 8470210db7f60a35ca463e737d825de30735ddc7..1729d3fd7a11417ed63c784986290b9bba5b1a4c 100644 (file)
@@ -289,7 +289,7 @@ int __init find_via_pmu(void)
        if (vias == NULL)
                return 0;
 
-       reg = get_property(vias, "reg", NULL);
+       reg = of_get_property(vias, "reg", NULL);
        if (reg == NULL) {
                printk(KERN_ERR "via-pmu: No \"reg\" property !\n");
                goto fail;
@@ -334,7 +334,7 @@ int __init find_via_pmu(void)
                
                gpiop = of_find_node_by_name(NULL, "gpio");
                if (gpiop) {
-                       reg = get_property(gpiop, "reg", NULL);
+                       reg = of_get_property(gpiop, "reg", NULL);
                        if (reg)
                                gaddr = of_translate_address(gpiop, reg);
                        if (gaddr != OF_BAD_ADDR)
@@ -491,7 +491,7 @@ static int __init via_pmu_dev_init(void)
                        of_find_node_by_name(NULL, "power-mgt");
                const u32 *prim_info = NULL;
                if (prim)
-                       prim_info = get_property(prim, "prim-info", NULL);
+                       prim_info = of_get_property(prim, "prim-info", NULL);
                if (prim_info) {
                        /* Other stuffs here yet unknown */
                        pmu_battery_count = (prim_info[6] >> 16) & 0xff;
index 3f7967feaf5b7e7900c3134e40cb5b3f33fef493..ab4d1b63f63e673c70f3321a837cc4f029a380c4 100644 (file)
@@ -176,7 +176,7 @@ static int wf_lm75_attach(struct i2c_adapter *adapter)
        for (dev = NULL;
             (dev = of_get_next_child(busnode, dev)) != NULL;) {
                const char *loc =
-                       get_property(dev, "hwsensor-location", NULL);
+                       of_get_property(dev, "hwsensor-location", NULL);
                u8 addr;
 
                /* We must re-match the adapter in order to properly check
index eae1189d6c41f6755636629df11621e6ef2d76a6..eaa74afa175ba44efc29aaec393b6aadc9a59c0b 100644 (file)
@@ -134,7 +134,7 @@ static int wf_max6690_attach(struct i2c_adapter *adapter)
                if (!device_is_compatible(dev, "max6690"))
                        continue;
                addr = pmac_i2c_get_dev_addr(dev);
-               loc = get_property(dev, "hwsensor-location", NULL);
+               loc = of_get_property(dev, "hwsensor-location", NULL);
                if (loc == NULL || addr == 0)
                        continue;
                printk("found max6690, loc=%s addr=0x%02x\n", loc, addr);
index 31b750d61206acd13091d39a68218d0e251284e8..ff398adc0283b720ff0ba7265e03725a3edbd5ec 100644 (file)
@@ -167,7 +167,7 @@ static struct smu_fan_control *smu_fan_create(struct device_node *node,
        if (fct == NULL)
                return NULL;
        fct->ctrl.ops = &smu_fan_ops;
-       l = get_property(node, "location", NULL);
+       l = of_get_property(node, "location", NULL);
        if (l == NULL)
                goto fail;
 
@@ -224,17 +224,17 @@ static struct smu_fan_control *smu_fan_create(struct device_node *node,
                goto fail;
 
        /* Get min & max values*/
-       v = get_property(node, "min-value", NULL);
+       v = of_get_property(node, "min-value", NULL);
        if (v == NULL)
                goto fail;
        fct->min = *v;
-       v = get_property(node, "max-value", NULL);
+       v = of_get_property(node, "max-value", NULL);
        if (v == NULL)
                goto fail;
        fct->max = *v;
 
        /* Get "reg" value */
-       reg = get_property(node, "reg", NULL);
+       reg = of_get_property(node, "reg", NULL);
        if (reg == NULL)
                goto fail;
        fct->reg = *reg;
index 83f79de7174beea3859afa905fe31b73a2bb50e4..9a6c2cf8fd0e6e54ffaf31bfb2847210df0a5796 100644 (file)
@@ -241,7 +241,7 @@ static void wf_sat_create(struct i2c_adapter *adapter, struct device_node *dev)
        char *name;
        int vsens[2], isens[2];
 
-       reg = get_property(dev, "reg", NULL);
+       reg = of_get_property(dev, "reg", NULL);
        if (reg == NULL)
                return;
        addr = *reg;
@@ -268,9 +268,9 @@ static void wf_sat_create(struct i2c_adapter *adapter, struct device_node *dev)
        isens[0] = isens[1] = -1;
        child = NULL;
        while ((child = of_get_next_child(dev, child)) != NULL) {
-               reg = get_property(child, "reg", NULL);
-               type = get_property(child, "device_type", NULL);
-               loc = get_property(child, "location", NULL);
+               reg = of_get_property(child, "reg", NULL);
+               type = of_get_property(child, "device_type", NULL);
+               loc = of_get_property(child, "location", NULL);
                if (reg == NULL || loc == NULL)
                        continue;
 
index 01b4c50143ddc77010b0ef72bc57f85f11861a5d..9c567b93f417b05d7ad15cd054c30627d851fb16 100644 (file)
@@ -204,8 +204,8 @@ static struct smu_ad_sensor *smu_ads_create(struct device_node *node)
        ads = kmalloc(sizeof(struct smu_ad_sensor), GFP_KERNEL);
        if (ads == NULL)
                return NULL;
-       c = get_property(node, "device_type", NULL);
-       l = get_property(node, "location", NULL);
+       c = of_get_property(node, "device_type", NULL);
+       l = of_get_property(node, "location", NULL);
        if (c == NULL || l == NULL)
                goto fail;
 
@@ -255,7 +255,7 @@ static struct smu_ad_sensor *smu_ads_create(struct device_node *node)
        } else
                goto fail;
 
-       v = get_property(node, "reg", NULL);
+       v = of_get_property(node, "reg", NULL);
        if (v == NULL)
                goto fail;
        ads->reg = *v;