]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[POWERPC] tsi108: Constify & voidify get_property()
authorJeremy Kerr <jk@ozlabs.org>
Wed, 12 Jul 2006 05:41:52 +0000 (15:41 +1000)
committerPaul Mackerras <paulus@samba.org>
Mon, 31 Jul 2006 05:55:06 +0000 (15:55 +1000)
Now that get_property() returns a void *, there's no need to cast its
return value. Also, treat the return value as const, so we can
constify get_property later.

tsi108 driver changes.

Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/sysdev/tsi108_pci.c

index 3265d54c82ed8c9f6cea5f6ade333bcc122efde6..f6c492f8ab955040508ac85e7f930eda4efba149 100644 (file)
@@ -195,7 +195,7 @@ int __init tsi108_setup_pci(struct device_node *dev)
        int len;
        struct pci_controller *hose;
        struct resource rsrc;
-       int *bus_range;
+       const int *bus_range;
        int primary = 0, has_address = 0;
 
        /* PCI Config mapping */
@@ -208,7 +208,7 @@ int __init tsi108_setup_pci(struct device_node *dev)
        has_address = (of_address_to_resource(dev, 0, &rsrc) == 0);
 
        /* Get bus range if any */
-       bus_range = (int *)get_property(dev, "bus-range", &len);
+       bus_range = get_property(dev, "bus-range", &len);
        if (bus_range == NULL || len < 2 * sizeof(int)) {
                printk(KERN_WARNING "Can't get bus-range for %s, assume"
                       " bus 0\n", dev->full_name);