]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
of: add 'of_' prefix to machine_is_compatible()
authorGrant Likely <grant.likely@secretlab.ca>
Tue, 2 Feb 2010 04:34:14 +0000 (21:34 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Tue, 9 Feb 2010 15:33:00 +0000 (08:33 -0700)
machine is compatible is an OF-specific call.  It should have
the of_ prefix to protect the global namespace.

Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Michal Simek <monstr@monstr.eu>
40 files changed:
arch/powerpc/kernel/pci_64.c
arch/powerpc/platforms/85xx/xes_mpc85xx.c
arch/powerpc/platforms/cell/cbe_powerbutton.c
arch/powerpc/platforms/cell/ras.c
arch/powerpc/platforms/pasemi/cpufreq.c
arch/powerpc/platforms/powermac/cpufreq_32.c
arch/powerpc/platforms/powermac/cpufreq_64.c
arch/powerpc/platforms/powermac/feature.c
arch/powerpc/platforms/powermac/smp.c
arch/powerpc/platforms/powermac/time.c
arch/powerpc/platforms/powermac/udbg_scc.c
arch/powerpc/sysdev/grackle.c
drivers/char/hvc_beat.c
drivers/gpu/drm/radeon/radeon_combios.c
drivers/macintosh/adb.c
drivers/macintosh/therm_pm72.c
drivers/macintosh/therm_windtunnel.c
drivers/macintosh/via-pmu-backlight.c
drivers/macintosh/via-pmu.c
drivers/macintosh/windfarm_core.c
drivers/macintosh/windfarm_cpufreq_clamp.c
drivers/macintosh/windfarm_lm75_sensor.c
drivers/macintosh/windfarm_max6690_sensor.c
drivers/macintosh/windfarm_pm112.c
drivers/macintosh/windfarm_pm121.c
drivers/macintosh/windfarm_pm81.c
drivers/macintosh/windfarm_pm91.c
drivers/macintosh/windfarm_smu_sensors.c
drivers/net/mace.c
drivers/of/base.c
drivers/serial/pmac_zilog.c
drivers/video/aty/aty128fb.c
drivers/video/aty/atyfb_base.c
drivers/video/aty/radeon_backlight.c
include/linux/of_fdt.h
sound/ppc/awacs.c
sound/ppc/burgundy.c
sound/ppc/pmac.c
sound/soc/fsl/efika-audio-fabric.c
sound/soc/fsl/pcm030-audio-fabric.c

index ccf56ac92de552fd0f5d7867430f6d510977064f..d43fc65749c1161e1b016f884792fcf73948479d 100644 (file)
@@ -224,7 +224,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
         * G5 machines... So when something asks for bus 0 io base
         * (bus 0 is HT root), we return the AGP one instead.
         */
-       if (in_bus == 0 && machine_is_compatible("MacRISC4")) {
+       if (in_bus == 0 && of_machine_is_compatible("MacRISC4")) {
                struct device_node *agp;
 
                agp = of_find_compatible_node(NULL, NULL, "u3-agp");
index 1b426050a2f91952cb588f2a61388430e387780a..0125604d096e917de7c7c6a923aa61df37c538a8 100644 (file)
@@ -80,8 +80,8 @@ static void xes_mpc85xx_configure_l2(void __iomem *l2_base)
        printk(KERN_INFO "xes_mpc85xx: Enabling L2 as cache\n");
 
        ctl = MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2I;
-       if (machine_is_compatible("MPC8540") ||
-           machine_is_compatible("MPC8560"))
+       if (of_machine_is_compatible("MPC8540") ||
+           of_machine_is_compatible("MPC8560"))
                /*
                 * Assume L2 SRAM is used fully for cache, so set
                 * L2BLKSZ (bits 4:5) to match L2SIZ (bits 2:3).
index dcddaa5fcb665164bcd0b25370f28bd3fb9d934c..f75a4daa4ca2821439b17177a43a0969e1d2cf82 100644 (file)
@@ -48,7 +48,7 @@ static int __init cbe_powerbutton_init(void)
        int ret = 0;
        struct input_dev *dev;
 
-       if (!machine_is_compatible("IBM,CBPLUS-1.0")) {
+       if (!of_machine_is_compatible("IBM,CBPLUS-1.0")) {
                printk(KERN_ERR "%s: Not a cell blade.\n", __func__);
                ret = -ENODEV;
                goto out;
index 5e0a191764fc0158b5eb7377af019615c3540767..608fd2b584c910548aff61f8a6c4d421a731b572 100644 (file)
@@ -255,7 +255,7 @@ static int __init cbe_sysreset_init(void)
 {
        struct cbe_pmd_regs __iomem *regs;
 
-       sysreset_hack = machine_is_compatible("IBM,CBPLUS-1.0");
+       sysreset_hack = of_machine_is_compatible("IBM,CBPLUS-1.0");
        if (!sysreset_hack)
                return 0;
 
index be2527a516eabcd5cc6c8db97d22c613abfdcc9a..d35e0520abf007d5278f0f07eaac082a09e170e4 100644 (file)
@@ -304,8 +304,8 @@ static struct cpufreq_driver pas_cpufreq_driver = {
 
 static int __init pas_cpufreq_init(void)
 {
-       if (!machine_is_compatible("PA6T-1682M") &&
-           !machine_is_compatible("pasemi,pwrficient"))
+       if (!of_machine_is_compatible("PA6T-1682M") &&
+           !of_machine_is_compatible("pasemi,pwrficient"))
                return -ENODEV;
 
        return cpufreq_register_driver(&pas_cpufreq_driver);
index 08d94e4cedd359909782c71b3b8219409745fc5b..d4f127d18141192bef0d3771e81bc79529d707fc 100644 (file)
@@ -657,31 +657,31 @@ static int __init pmac_cpufreq_setup(void)
        cur_freq = (*value) / 1000;
 
        /*  Check for 7447A based MacRISC3 */
-       if (machine_is_compatible("MacRISC3") &&
+       if (of_machine_is_compatible("MacRISC3") &&
            of_get_property(cpunode, "dynamic-power-step", NULL) &&
            PVR_VER(mfspr(SPRN_PVR)) == 0x8003) {
                pmac_cpufreq_init_7447A(cpunode);
        /* Check for other MacRISC3 machines */
-       } else if (machine_is_compatible("PowerBook3,4") ||
-                  machine_is_compatible("PowerBook3,5") ||
-                  machine_is_compatible("MacRISC3")) {
+       } else if (of_machine_is_compatible("PowerBook3,4") ||
+                  of_machine_is_compatible("PowerBook3,5") ||
+                  of_machine_is_compatible("MacRISC3")) {
                pmac_cpufreq_init_MacRISC3(cpunode);
        /* Else check for iBook2 500/600 */
-       } else if (machine_is_compatible("PowerBook4,1")) {
+       } else if (of_machine_is_compatible("PowerBook4,1")) {
                hi_freq = cur_freq;
                low_freq = 400000;
                set_speed_proc = pmu_set_cpu_speed;
                is_pmu_based = 1;
        }
        /* Else check for TiPb 550 */
-       else if (machine_is_compatible("PowerBook3,3") && cur_freq == 550000) {
+       else if (of_machine_is_compatible("PowerBook3,3") && cur_freq == 550000) {
                hi_freq = cur_freq;
                low_freq = 500000;
                set_speed_proc = pmu_set_cpu_speed;
                is_pmu_based = 1;
        }
        /* Else check for TiPb 400 & 500 */
-       else if (machine_is_compatible("PowerBook3,2")) {
+       else if (of_machine_is_compatible("PowerBook3,2")) {
                /* We only know about the 400 MHz and the 500Mhz model
                 * they both have 300 MHz as low frequency
                 */
index 708c751333770b216009d1d4d112a0b0a74c08d1..3ed288e68ec4e613546b12b3ce4f9ec734830488 100644 (file)
@@ -398,11 +398,11 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
        int rc = -ENODEV;
 
        /* Check supported platforms */
-       if (machine_is_compatible("PowerMac8,1") ||
-           machine_is_compatible("PowerMac8,2") ||
-           machine_is_compatible("PowerMac9,1"))
+       if (of_machine_is_compatible("PowerMac8,1") ||
+           of_machine_is_compatible("PowerMac8,2") ||
+           of_machine_is_compatible("PowerMac9,1"))
                use_volts_smu = 1;
-       else if (machine_is_compatible("PowerMac11,2"))
+       else if (of_machine_is_compatible("PowerMac11,2"))
                use_volts_vdnap = 1;
        else
                return -ENODEV;
@@ -729,9 +729,9 @@ static int __init g5_cpufreq_init(void)
                return -ENODEV;
        }
 
-       if (machine_is_compatible("PowerMac7,2") ||
-           machine_is_compatible("PowerMac7,3") ||
-           machine_is_compatible("RackMac3,1"))
+       if (of_machine_is_compatible("PowerMac7,2") ||
+           of_machine_is_compatible("PowerMac7,3") ||
+           of_machine_is_compatible("RackMac3,1"))
                rc = g5_pm72_cpufreq_init(cpus);
 #ifdef CONFIG_PMAC_SMU
        else
index fbc9bbd74dbdc9337ca2880f1d50a590d8f9f3a1..33e815f4466cbe4c58bb80281d29576abc417ca9 100644 (file)
@@ -2426,7 +2426,7 @@ static int __init probe_motherboard(void)
            }
        }
        for(i=0; i<ARRAY_SIZE(pmac_mb_defs); i++) {
-           if (machine_is_compatible(pmac_mb_defs[i].model_string)) {
+           if (of_machine_is_compatible(pmac_mb_defs[i].model_string)) {
                pmac_mb = pmac_mb_defs[i];
                goto found;
            }
index b40c22d697f006d06f2e952a5a602dee999bc333..6898e8241cd03826335aae8653e82a1775b5eb24 100644 (file)
@@ -693,9 +693,9 @@ static void __init smp_core99_setup(int ncpus)
 #ifdef CONFIG_PPC64
 
        /* i2c based HW sync on some G5s */
-       if (machine_is_compatible("PowerMac7,2") ||
-           machine_is_compatible("PowerMac7,3") ||
-           machine_is_compatible("RackMac3,1"))
+       if (of_machine_is_compatible("PowerMac7,2") ||
+           of_machine_is_compatible("PowerMac7,3") ||
+           of_machine_is_compatible("RackMac3,1"))
                smp_core99_setup_i2c_hwsync(ncpus);
 
        /* pfunc based HW sync on recent G5s */
@@ -713,7 +713,7 @@ static void __init smp_core99_setup(int ncpus)
 #else /* CONFIG_PPC64 */
 
        /* GPIO based HW sync on ppc32 Core99 */
-       if (pmac_tb_freeze == NULL && !machine_is_compatible("MacRISC4")) {
+       if (pmac_tb_freeze == NULL && !of_machine_is_compatible("MacRISC4")) {
                struct device_node *cpu;
                const u32 *tbprop = NULL;
 
@@ -750,7 +750,7 @@ static void __init smp_core99_setup(int ncpus)
 #endif
 
        /* 32 bits SMP can't NAP */
-       if (!machine_is_compatible("MacRISC4"))
+       if (!of_machine_is_compatible("MacRISC4"))
                powersave_nap = 0;
 }
 
@@ -852,7 +852,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr)
                /* If we didn't start the second CPU, we must take
                 * it off the bus
                 */
-               if (machine_is_compatible("MacRISC4") &&
+               if (of_machine_is_compatible("MacRISC4") &&
                    num_online_cpus() < 2)              
                        g5_phy_disable_cpu1();
 #endif /* CONFIG_PPC64 */
index 1810e4226e5615543999e7242a8c467991707907..48211ca134c3b3845c80af2a8ab58d9549ffa776 100644 (file)
@@ -317,9 +317,9 @@ void __init pmac_calibrate_decr(void)
         * calibration. That's better since the VIA itself seems
         * to be slightly off. --BenH
         */
-       if (!machine_is_compatible("MacRISC2") &&
-           !machine_is_compatible("MacRISC3") &&
-           !machine_is_compatible("MacRISC4"))
+       if (!of_machine_is_compatible("MacRISC2") &&
+           !of_machine_is_compatible("MacRISC3") &&
+           !of_machine_is_compatible("MacRISC4"))
                if (via_calibrate_decr())
                        return;
 
@@ -328,7 +328,7 @@ void __init pmac_calibrate_decr(void)
         * probably implement calibration based on the KL timer on these
         * machines anyway... -BenH
         */
-       if (machine_is_compatible("PowerMac3,5"))
+       if (of_machine_is_compatible("PowerMac3,5"))
                if (via_calibrate_decr())
                        return;
 #endif
index 9490157da62e06a066073db4b462890ff16f038c..d83135a9830ead5f677b5af278fc183949d6df30 100644 (file)
@@ -132,9 +132,9 @@ void udbg_scc_init(int force_scc)
                scc_inittab[1] = in_8(sccc);
                out_8(sccc, 12);
                scc_inittab[3] = in_8(sccc);
-       } else if (machine_is_compatible("RackMac1,1")
-                  || machine_is_compatible("RackMac1,2")
-                  || machine_is_compatible("MacRISC4")) {
+       } else if (of_machine_is_compatible("RackMac1,1")
+                  || of_machine_is_compatible("RackMac1,2")
+                  || of_machine_is_compatible("MacRISC4")) {
                /* Xserves and G5s default to 57600 */
                scc_inittab[1] = 0;
                scc_inittab[3] = 0;
index 5da37c2f22ee28db96e064aae1172e3b61e4a3c1..cf27df6e508bb8ea2d6a0e33c0be595d8d2ad58b 100644 (file)
@@ -56,9 +56,9 @@ static inline void grackle_set_loop_snoop(struct pci_controller *bp, int enable)
 void __init setup_grackle(struct pci_controller *hose)
 {
        setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0);
-       if (machine_is_compatible("PowerMac1,1"))
+       if (of_machine_is_compatible("PowerMac1,1"))
                ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS);
-       if (machine_is_compatible("AAPL,PowerBook1998"))
+       if (of_machine_is_compatible("AAPL,PowerBook1998"))
                grackle_set_loop_snoop(hose, 1);
 #if 0  /* Disabled for now, HW problems ??? */
        grackle_set_stg(hose, 1);
index 0afc8b82212e78dd17d7d2b254ec099b5642cfb7..9b397c5ee1d7cefbd5c41d9d0bd559a88a172fdf 100644 (file)
@@ -99,7 +99,7 @@ static int hvc_beat_config(char *p)
 
 static int __init hvc_beat_console_init(void)
 {
-       if (hvc_beat_useit && machine_is_compatible("Beat")) {
+       if (hvc_beat_useit && of_machine_is_compatible("Beat")) {
                hvc_instantiate(0, 0, &hvc_beat_get_put_ops);
        }
        return 0;
index 579c8920e08144b4f6eea6311e706d0aa921ca5b..13826a534065849e39c394e1e28921327ef764b7 100644 (file)
@@ -1280,47 +1280,47 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
        rdev->mode_info.connector_table = radeon_connector_table;
        if (rdev->mode_info.connector_table == CT_NONE) {
 #ifdef CONFIG_PPC_PMAC
-               if (machine_is_compatible("PowerBook3,3")) {
+               if (of_machine_is_compatible("PowerBook3,3")) {
                        /* powerbook with VGA */
                        rdev->mode_info.connector_table = CT_POWERBOOK_VGA;
-               } else if (machine_is_compatible("PowerBook3,4") ||
-                          machine_is_compatible("PowerBook3,5")) {
+               } else if (of_machine_is_compatible("PowerBook3,4") ||
+                          of_machine_is_compatible("PowerBook3,5")) {
                        /* powerbook with internal tmds */
                        rdev->mode_info.connector_table = CT_POWERBOOK_INTERNAL;
-               } else if (machine_is_compatible("PowerBook5,1") ||
-                          machine_is_compatible("PowerBook5,2") ||
-                          machine_is_compatible("PowerBook5,3") ||
-                          machine_is_compatible("PowerBook5,4") ||
-                          machine_is_compatible("PowerBook5,5")) {
+               } else if (of_machine_is_compatible("PowerBook5,1") ||
+                          of_machine_is_compatible("PowerBook5,2") ||
+                          of_machine_is_compatible("PowerBook5,3") ||
+                          of_machine_is_compatible("PowerBook5,4") ||
+                          of_machine_is_compatible("PowerBook5,5")) {
                        /* powerbook with external single link tmds (sil164) */
                        rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL;
-               } else if (machine_is_compatible("PowerBook5,6")) {
+               } else if (of_machine_is_compatible("PowerBook5,6")) {
                        /* powerbook with external dual or single link tmds */
                        rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL;
-               } else if (machine_is_compatible("PowerBook5,7") ||
-                          machine_is_compatible("PowerBook5,8") ||
-                          machine_is_compatible("PowerBook5,9")) {
+               } else if (of_machine_is_compatible("PowerBook5,7") ||
+                          of_machine_is_compatible("PowerBook5,8") ||
+                          of_machine_is_compatible("PowerBook5,9")) {
                        /* PowerBook6,2 ? */
                        /* powerbook with external dual link tmds (sil1178?) */
                        rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL;
-               } else if (machine_is_compatible("PowerBook4,1") ||
-                          machine_is_compatible("PowerBook4,2") ||
-                          machine_is_compatible("PowerBook4,3") ||
-                          machine_is_compatible("PowerBook6,3") ||
-                          machine_is_compatible("PowerBook6,5") ||
-                          machine_is_compatible("PowerBook6,7")) {
+               } else if (of_machine_is_compatible("PowerBook4,1") ||
+                          of_machine_is_compatible("PowerBook4,2") ||
+                          of_machine_is_compatible("PowerBook4,3") ||
+                          of_machine_is_compatible("PowerBook6,3") ||
+                          of_machine_is_compatible("PowerBook6,5") ||
+                          of_machine_is_compatible("PowerBook6,7")) {
                        /* ibook */
                        rdev->mode_info.connector_table = CT_IBOOK;
-               } else if (machine_is_compatible("PowerMac4,4")) {
+               } else if (of_machine_is_compatible("PowerMac4,4")) {
                        /* emac */
                        rdev->mode_info.connector_table = CT_EMAC;
-               } else if (machine_is_compatible("PowerMac10,1")) {
+               } else if (of_machine_is_compatible("PowerMac10,1")) {
                        /* mini with internal tmds */
                        rdev->mode_info.connector_table = CT_MINI_INTERNAL;
-               } else if (machine_is_compatible("PowerMac10,2")) {
+               } else if (of_machine_is_compatible("PowerMac10,2")) {
                        /* mini with external tmds */
                        rdev->mode_info.connector_table = CT_MINI_EXTERNAL;
-               } else if (machine_is_compatible("PowerMac12,1")) {
+               } else if (of_machine_is_compatible("PowerMac12,1")) {
                        /* PowerMac8,1 ? */
                        /* imac g5 isight */
                        rdev->mode_info.connector_table = CT_IMAC_G5_ISIGHT;
index 23741cec45e3e43210fdbac7e11c6ecc9c4eb1d5..d840a109f8336968b42aa3f96d8751318fdf763b 100644 (file)
@@ -322,8 +322,8 @@ static int __init adb_init(void)
                adb_controller = NULL;
        } else {
 #ifdef CONFIG_PPC
-               if (machine_is_compatible("AAPL,PowerBook1998") ||
-                       machine_is_compatible("PowerBook1,1"))
+               if (of_machine_is_compatible("AAPL,PowerBook1998") ||
+                       of_machine_is_compatible("PowerBook1,1"))
                        sleepy_trackpad = 1;
 #endif /* CONFIG_PPC */
 
index 454bc501df3cfbb3629f0388692a8931bb6fcc94..5738d8bf2d97e8918330147c8827e551fd2ec317 100644 (file)
@@ -1899,7 +1899,7 @@ static int create_control_loops(void)
         */
        if (rackmac)
                cpu_pid_type = CPU_PID_TYPE_RACKMAC;
-       else if (machine_is_compatible("PowerMac7,3")
+       else if (of_machine_is_compatible("PowerMac7,3")
            && (cpu_count > 1)
            && fcu_fans[CPUA_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID
            && fcu_fans[CPUB_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID) {
@@ -2234,10 +2234,10 @@ static int __init therm_pm72_init(void)
 {
        struct device_node *np;
 
-       rackmac = machine_is_compatible("RackMac3,1");
+       rackmac = of_machine_is_compatible("RackMac3,1");
 
-       if (!machine_is_compatible("PowerMac7,2") &&
-           !machine_is_compatible("PowerMac7,3") &&
+       if (!of_machine_is_compatible("PowerMac7,2") &&
+           !of_machine_is_compatible("PowerMac7,3") &&
            !rackmac)
                return -ENODEV;
 
index ba48fd76396eb9746d72e0db077b55dbf0f23ffa..7fb8b4da35a7a740c81dbd005e2d05d1f656926d 100644 (file)
@@ -490,7 +490,7 @@ g4fan_init( void )
        info = of_get_property(np, "thermal-info", NULL);
        of_node_put(np);
 
-       if( !info || !machine_is_compatible("PowerMac3,6") )
+       if( !info || !of_machine_is_compatible("PowerMac3,6") )
                return -ENODEV;
 
        if( info->id != 3 ) {
index a348bb0791d37b764a2e61ffe55bacd57a12e182..4f3c4479c16aa16da18efd22bbc37e12dc39d2c7 100644 (file)
@@ -150,13 +150,13 @@ void __init pmu_backlight_init()
 
        /* Special case for the old PowerBook since I can't test on it */
        autosave =
-               machine_is_compatible("AAPL,3400/2400") ||
-               machine_is_compatible("AAPL,3500");
+               of_machine_is_compatible("AAPL,3400/2400") ||
+               of_machine_is_compatible("AAPL,3500");
 
        if (!autosave &&
            !pmac_has_backlight_type("pmu") &&
-           !machine_is_compatible("AAPL,PowerBook1998") &&
-           !machine_is_compatible("PowerBook1,1"))
+           !of_machine_is_compatible("AAPL,PowerBook1998") &&
+           !of_machine_is_compatible("PowerBook1,1"))
                return;
 
        snprintf(name, sizeof(name), "pmubl");
index db379c3814326db904a17a76b7182ec4266a3a4a..42764849eb787c42fe38315333e0d6bbcd544287 100644 (file)
@@ -463,8 +463,8 @@ static int __init via_pmu_dev_init(void)
 #endif
 
 #ifdef CONFIG_PPC32
-       if (machine_is_compatible("AAPL,3400/2400") ||
-               machine_is_compatible("AAPL,3500")) {
+       if (of_machine_is_compatible("AAPL,3400/2400") ||
+               of_machine_is_compatible("AAPL,3500")) {
                int mb = pmac_call_feature(PMAC_FTR_GET_MB_INFO,
                        NULL, PMAC_MB_INFO_MODEL, 0);
                pmu_battery_count = 1;
@@ -472,8 +472,8 @@ static int __init via_pmu_dev_init(void)
                        pmu_batteries[0].flags |= PMU_BATT_TYPE_COMET;
                else
                        pmu_batteries[0].flags |= PMU_BATT_TYPE_HOOPER;
-       } else if (machine_is_compatible("AAPL,PowerBook1998") ||
-               machine_is_compatible("PowerBook1,1")) {
+       } else if (of_machine_is_compatible("AAPL,PowerBook1998") ||
+               of_machine_is_compatible("PowerBook1,1")) {
                pmu_battery_count = 2;
                pmu_batteries[0].flags |= PMU_BATT_TYPE_SMART;
                pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART;
index 075b4d99e35497c9a8f505af04d1fdf617489680..437f55c5d18d32f02fbd89c6fd220108cfe6e857 100644 (file)
@@ -468,9 +468,9 @@ static int __init windfarm_core_init(void)
        DBG("wf: core loaded\n");
 
        /* Don't register on old machines that use therm_pm72 for now */
-       if (machine_is_compatible("PowerMac7,2") ||
-           machine_is_compatible("PowerMac7,3") ||
-           machine_is_compatible("RackMac3,1"))
+       if (of_machine_is_compatible("PowerMac7,2") ||
+           of_machine_is_compatible("PowerMac7,3") ||
+           of_machine_is_compatible("RackMac3,1"))
                return -ENODEV;
        platform_device_register(&wf_platform_device);
        return 0;
index 900aade0619871c683b2a29cf45a3638c925a957..1a77a7c97d0e58d3141b667b6ff2b55be0aa3f52 100644 (file)
@@ -76,9 +76,9 @@ static int __init wf_cpufreq_clamp_init(void)
        struct wf_control *clamp;
 
        /* Don't register on old machines that use therm_pm72 for now */
-       if (machine_is_compatible("PowerMac7,2") ||
-           machine_is_compatible("PowerMac7,3") ||
-           machine_is_compatible("RackMac3,1"))
+       if (of_machine_is_compatible("PowerMac7,2") ||
+           of_machine_is_compatible("PowerMac7,3") ||
+           of_machine_is_compatible("RackMac3,1"))
                return -ENODEV;
 
        clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL);
index ed6426a107738b4dff5a1d639140a7f22b7c9b27..d8257d35afde91c225b49bad6f0cc9885cf3fc69 100644 (file)
@@ -239,9 +239,9 @@ static struct i2c_driver wf_lm75_driver = {
 static int __init wf_lm75_sensor_init(void)
 {
        /* Don't register on old machines that use therm_pm72 for now */
-       if (machine_is_compatible("PowerMac7,2") ||
-           machine_is_compatible("PowerMac7,3") ||
-           machine_is_compatible("RackMac3,1"))
+       if (of_machine_is_compatible("PowerMac7,2") ||
+           of_machine_is_compatible("PowerMac7,3") ||
+           of_machine_is_compatible("RackMac3,1"))
                return -ENODEV;
        return i2c_add_driver(&wf_lm75_driver);
 }
index a67b349319e9c9be57f19faf3f309ff487e06448..b486eb929fde725fb9e0271d4af46cdc241c2113 100644 (file)
@@ -188,9 +188,9 @@ static struct i2c_driver wf_max6690_driver = {
 static int __init wf_max6690_sensor_init(void)
 {
        /* Don't register on old machines that use therm_pm72 for now */
-       if (machine_is_compatible("PowerMac7,2") ||
-           machine_is_compatible("PowerMac7,3") ||
-           machine_is_compatible("RackMac3,1"))
+       if (of_machine_is_compatible("PowerMac7,2") ||
+           of_machine_is_compatible("PowerMac7,3") ||
+           of_machine_is_compatible("RackMac3,1"))
                return -ENODEV;
        return i2c_add_driver(&wf_max6690_driver);
 }
index 73d695dc9e5059c950c99f8c08a0cd30a2141c39..e0ee80700cde4713430452bffbeb0625a51479db 100644 (file)
@@ -676,7 +676,7 @@ static int __init wf_pm112_init(void)
 {
        struct device_node *cpu;
 
-       if (!machine_is_compatible("PowerMac11,2"))
+       if (!of_machine_is_compatible("PowerMac11,2"))
                return -ENODEV;
 
        /* Count the number of CPU cores */
index 66ec4fb115bb203a3c566cead227e650386b8d4d..947d4afa25ca9abfe199ffea35f2233e944c9498 100644 (file)
@@ -1008,7 +1008,7 @@ static int __init pm121_init(void)
 {
        int rc = -ENODEV;
 
-       if (machine_is_compatible("PowerMac12,1"))
+       if (of_machine_is_compatible("PowerMac12,1"))
                rc = pm121_init_pm();
 
        if (rc == 0) {
index abbe206474f58ce2ff1de53e274d6df7158b92f4..565d5b2adc95918e2d89a2076bc6b6441d70a3da 100644 (file)
@@ -779,8 +779,8 @@ static int __init wf_smu_init(void)
 {
        int rc = -ENODEV;
 
-       if (machine_is_compatible("PowerMac8,1") ||
-           machine_is_compatible("PowerMac8,2"))
+       if (of_machine_is_compatible("PowerMac8,1") ||
+           of_machine_is_compatible("PowerMac8,2"))
                rc = wf_init_pm();
 
        if (rc == 0) {
index 764c525b2117f0ac2420992063ac1efdcb512a21..bea99168ff35c9366d43d0ad460b0989c2f2f225 100644 (file)
@@ -711,7 +711,7 @@ static int __init wf_smu_init(void)
 {
        int rc = -ENODEV;
 
-       if (machine_is_compatible("PowerMac9,1"))
+       if (of_machine_is_compatible("PowerMac9,1"))
                rc = wf_init_pm();
 
        if (rc == 0) {
index 9c567b93f417b05d7ad15cd054c30627d851fb16..3c193504bb8002d9aa8d497976c119967a63700c 100644 (file)
@@ -363,9 +363,9 @@ smu_cpu_power_create(struct wf_sensor *volts, struct wf_sensor *amps)
         * I yet have to figure out what's up with 8,2 and will have to
         * adjust for later, unless we can 100% trust the SDB partition...
         */
-       if ((machine_is_compatible("PowerMac8,1") ||
-            machine_is_compatible("PowerMac8,2") ||
-            machine_is_compatible("PowerMac9,1")) &&
+       if ((of_machine_is_compatible("PowerMac8,1") ||
+            of_machine_is_compatible("PowerMac8,2") ||
+            of_machine_is_compatible("PowerMac9,1")) &&
            cpuvcp_version >= 2) {
                pow->quadratic = 1;
                DBG("windfarm: CPU Power using quadratic transform\n");
index d9fbad386389718a393437437336d6763644cc7c..43aea91e33699ace0a407bcd018f64a728b492ab 100644 (file)
@@ -206,7 +206,7 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
                mp->port_aaui = port_aaui;
        else {
                /* Apple Network Server uses the AAUI port */
-               if (machine_is_compatible("AAPL,ShinerESB"))
+               if (of_machine_is_compatible("AAPL,ShinerESB"))
                        mp->port_aaui = 1;
                else {
 #ifdef CONFIG_MACE_AAUI_PORT
index 785e9cc1b20797ab0925b0c3cd16ef0f1f17026b..6bc8740c21ad740f5908a3989318155207c9c993 100644 (file)
@@ -219,13 +219,13 @@ int of_device_is_compatible(const struct device_node *device,
 EXPORT_SYMBOL(of_device_is_compatible);
 
 /**
- * machine_is_compatible - Test root of device tree for a given compatible value
+ * of_machine_is_compatible - Test root of device tree for a given compatible value
  * @compat: compatible string to look for in root node's compatible property.
  *
  * Returns true if the root node has the given value in its
  * compatible property.
  */
-int machine_is_compatible(const char *compat)
+int of_machine_is_compatible(const char *compat)
 {
        struct device_node *root;
        int rc = 0;
@@ -237,7 +237,7 @@ int machine_is_compatible(const char *compat)
        }
        return rc;
 }
-EXPORT_SYMBOL(machine_is_compatible);
+EXPORT_SYMBOL(of_machine_is_compatible);
 
 /**
  *  of_device_is_available - check if a device is available for use
index 683e66f18e8cd37b45e5d91e18061470286cbb5b..3e2ae4807ae2f0a697945dcd0a18ba1b6091c2e3 100644 (file)
@@ -2031,9 +2031,9 @@ static int __init pmz_console_setup(struct console *co, char *options)
        /*
         * XServe's default to 57600 bps
         */
-       if (machine_is_compatible("RackMac1,1")
-           || machine_is_compatible("RackMac1,2")
-           || machine_is_compatible("MacRISC4"))
+       if (of_machine_is_compatible("RackMac1,1")
+           || of_machine_is_compatible("RackMac1,2")
+           || of_machine_is_compatible("MacRISC4"))
                baud = 57600;
 
        /*
index e4e4d433b00701a16bac2255bd54a1a10b928188..9ee67d6da7101f1d3b0f714553792f60015b4c02 100644 (file)
@@ -1931,22 +1931,22 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i
                         * PowerMac2,2 summer 2000 iMacs
                         * PowerMac4,1 january 2001 iMacs "flower power"
                         */
-                       if (machine_is_compatible("PowerMac2,1") ||
-                           machine_is_compatible("PowerMac2,2") ||
-                           machine_is_compatible("PowerMac4,1"))
+                       if (of_machine_is_compatible("PowerMac2,1") ||
+                           of_machine_is_compatible("PowerMac2,2") ||
+                           of_machine_is_compatible("PowerMac4,1"))
                                default_vmode = VMODE_1024_768_75;
 
                        /* iBook SE */
-                       if (machine_is_compatible("PowerBook2,2"))
+                       if (of_machine_is_compatible("PowerBook2,2"))
                                default_vmode = VMODE_800_600_60;
 
                        /* PowerBook Firewire (Pismo), iBook Dual USB */
-                       if (machine_is_compatible("PowerBook3,1") ||
-                           machine_is_compatible("PowerBook4,1"))
+                       if (of_machine_is_compatible("PowerBook3,1") ||
+                           of_machine_is_compatible("PowerBook4,1"))
                                default_vmode = VMODE_1024_768_60;
 
                        /* PowerBook Titanium */
-                       if (machine_is_compatible("PowerBook3,2"))
+                       if (of_machine_is_compatible("PowerBook3,2"))
                                default_vmode = VMODE_1152_768_60;
        
                        if (default_cmode > 16) 
index 5f1b5807a48fd79fc43a09470facd03d8b4d7ece..e45ab8db2ddc6f7f46d98ff09504dcc8c45ff2e6 100644 (file)
@@ -2439,7 +2439,7 @@ static int __devinit aty_init(struct fb_info *info)
         * The Apple iBook1 uses non-standard memory frequencies.
         * We detect it and set the frequency manually.
         */
-       if (machine_is_compatible("PowerBook2,1")) {
+       if (of_machine_is_compatible("PowerBook2,1")) {
                par->pll_limits.mclk = 70;
                par->pll_limits.xclk = 53;
        }
@@ -2659,7 +2659,7 @@ static int __devinit aty_init(struct fb_info *info)
                      FBINFO_HWACCEL_YPAN;
 
 #ifdef CONFIG_PMAC_BACKLIGHT
-       if (M64_HAS(G3_PB_1_1) && machine_is_compatible("PowerBook1,1")) {
+       if (M64_HAS(G3_PB_1_1) && of_machine_is_compatible("PowerBook1,1")) {
                /*
                 * these bits let the 101 powerbook
                 * wake up from sleep -- paulus
@@ -2690,9 +2690,9 @@ static int __devinit aty_init(struct fb_info *info)
                                if (M64_HAS(G3_PB_1024x768))
                                        /* G3 PowerBook with 1024x768 LCD */
                                        default_vmode = VMODE_1024_768_60;
-                               else if (machine_is_compatible("iMac"))
+                               else if (of_machine_is_compatible("iMac"))
                                        default_vmode = VMODE_1024_768_75;
-                               else if (machine_is_compatible("PowerBook2,1"))
+                               else if (of_machine_is_compatible("PowerBook2,1"))
                                        /* iBook with 800x600 LCD */
                                        default_vmode = VMODE_800_600_60;
                                else
index 1a056adb61c836784fce99d1c0314e710f4948e8..fa1198c4ccc5d0041072b5ca95913134e3531ee3 100644 (file)
@@ -175,9 +175,9 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
 
 #ifdef CONFIG_PMAC_BACKLIGHT
        pdata->negative = pdata->negative ||
-               machine_is_compatible("PowerBook4,3") ||
-               machine_is_compatible("PowerBook6,3") ||
-               machine_is_compatible("PowerBook6,5");
+               of_machine_is_compatible("PowerBook4,3") ||
+               of_machine_is_compatible("PowerBook6,3") ||
+               of_machine_is_compatible("PowerBook6,5");
 #endif
 
        rinfo->info->bl_dev = bd;
index 8118d4559dd535a461c87a46405bb593192c2011..fbf29610616d7a6f02f0dac226b3046ebba11e22 100644 (file)
@@ -85,7 +85,7 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
 extern void finish_device_tree(void);
 extern void unflatten_device_tree(void);
 extern void early_init_devtree(void *);
-extern int machine_is_compatible(const char *compat);
+extern int of_machine_is_compatible(const char *compat);
 extern void print_properties(struct device_node *node);
 extern int prom_n_intr_cells(struct device_node* np);
 extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
index 2e156467b814bf48c94ee902f363995a49cde6f6..b36679384b27b6ab1486481d15a6e779c9c6a126 100644 (file)
@@ -751,8 +751,8 @@ static void snd_pmac_awacs_suspend(struct snd_pmac *chip)
 
 static void snd_pmac_awacs_resume(struct snd_pmac *chip)
 {
-       if (machine_is_compatible("PowerBook3,1")
-           || machine_is_compatible("PowerBook3,2")) {
+       if (of_machine_is_compatible("PowerBook3,1")
+           || of_machine_is_compatible("PowerBook3,2")) {
                msleep(100);
                snd_pmac_awacs_write_reg(chip, 1,
                        chip->awacs_reg[1] & ~MASK_PAROUT);
@@ -780,16 +780,16 @@ static void snd_pmac_awacs_resume(struct snd_pmac *chip)
 }
 #endif /* CONFIG_PM */
 
-#define IS_PM7500 (machine_is_compatible("AAPL,7500") \
-               || machine_is_compatible("AAPL,8500") \
-               || machine_is_compatible("AAPL,9500"))
-#define IS_PM5500 (machine_is_compatible("AAPL,e411"))
-#define IS_BEIGE (machine_is_compatible("AAPL,Gossamer"))
-#define IS_IMAC1 (machine_is_compatible("PowerMac2,1"))
-#define IS_IMAC2 (machine_is_compatible("PowerMac2,2") \
-               || machine_is_compatible("PowerMac4,1"))
-#define IS_G4AGP (machine_is_compatible("PowerMac3,1"))
-#define IS_LOMBARD (machine_is_compatible("PowerBook1,1"))
+#define IS_PM7500 (of_machine_is_compatible("AAPL,7500") \
+               || of_machine_is_compatible("AAPL,8500") \
+               || of_machine_is_compatible("AAPL,9500"))
+#define IS_PM5500 (of_machine_is_compatible("AAPL,e411"))
+#define IS_BEIGE (of_machine_is_compatible("AAPL,Gossamer"))
+#define IS_IMAC1 (of_machine_is_compatible("PowerMac2,1"))
+#define IS_IMAC2 (of_machine_is_compatible("PowerMac2,2") \
+               || of_machine_is_compatible("PowerMac4,1"))
+#define IS_G4AGP (of_machine_is_compatible("PowerMac3,1"))
+#define IS_LOMBARD (of_machine_is_compatible("PowerBook1,1"))
 
 static int imac1, imac2;
 
index 0accfe49735bad21718be559ae110c657f15ceb0..1f72e1c786bf2f389e18788bd3b304287312617a 100644 (file)
@@ -582,7 +582,7 @@ static int snd_pmac_burgundy_detect_headphone(struct snd_pmac *chip)
 static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_notify)
 {
        if (chip->auto_mute) {
-               int imac = machine_is_compatible("iMac");
+               int imac = of_machine_is_compatible("iMac");
                int reg, oreg;
                reg = oreg = snd_pmac_burgundy_rcb(chip,
                                MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES);
@@ -620,7 +620,7 @@ static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_noti
  */
 int __devinit snd_pmac_burgundy_init(struct snd_pmac *chip)
 {
-       int imac = machine_is_compatible("iMac");
+       int imac = of_machine_is_compatible("iMac");
        int i, err;
 
        /* Checks to see the chip is alive and kicking */
index 7bc492ee77ecf1978f659e5180e62e55fb990cd9..85081172403f25ec056a99eb58a341fbd5d57370 100644 (file)
@@ -922,11 +922,11 @@ static void __devinit detect_byte_swap(struct snd_pmac *chip)
        }
 
        /* it seems the Pismo & iBook can't byte-swap in hardware. */
-       if (machine_is_compatible("PowerBook3,1") ||
-           machine_is_compatible("PowerBook2,1"))
+       if (of_machine_is_compatible("PowerBook3,1") ||
+           of_machine_is_compatible("PowerBook2,1"))
                chip->can_byte_swap = 0 ;
 
-       if (machine_is_compatible("PowerBook2,1"))
+       if (of_machine_is_compatible("PowerBook2,1"))
                chip->can_duplex = 0;
 }
 
@@ -959,11 +959,11 @@ static int __devinit snd_pmac_detect(struct snd_pmac *chip)
        chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */
 
        /* check machine type */
-       if (machine_is_compatible("AAPL,3400/2400")
-           || machine_is_compatible("AAPL,3500"))
+       if (of_machine_is_compatible("AAPL,3400/2400")
+           || of_machine_is_compatible("AAPL,3500"))
                chip->is_pbook_3400 = 1;
-       else if (machine_is_compatible("PowerBook1,1")
-                || machine_is_compatible("AAPL,PowerBook1998"))
+       else if (of_machine_is_compatible("PowerBook1,1")
+                || of_machine_is_compatible("AAPL,PowerBook1998"))
                chip->is_pbook_G3 = 1;
        chip->node = of_find_node_by_name(NULL, "awacs");
        sound = of_node_get(chip->node);
@@ -1033,8 +1033,8 @@ static int __devinit snd_pmac_detect(struct snd_pmac *chip)
        }
        if (of_device_is_compatible(sound, "tumbler")) {
                chip->model = PMAC_TUMBLER;
-               chip->can_capture = machine_is_compatible("PowerMac4,2")
-                               || machine_is_compatible("PowerBook4,1");
+               chip->can_capture = of_machine_is_compatible("PowerMac4,2")
+                               || of_machine_is_compatible("PowerBook4,1");
                chip->can_duplex = 0;
                // chip->can_byte_swap = 0; /* FIXME: check this */
                chip->num_freqs = ARRAY_SIZE(tumbler_freqs);
index 3326e2a1e8633a9ee357541c687536ec701f6f62..1a5b8e0d6a34d986fcfb62c5ac0c7cdc6ad9f2b7 100644 (file)
@@ -55,7 +55,7 @@ static __init int efika_fabric_init(void)
        struct platform_device *pdev;
        int rc;
 
-       if (!machine_is_compatible("bplan,efika"))
+       if (!of_machine_is_compatible("bplan,efika"))
                return -ENODEV;
 
        card.platform = &mpc5200_audio_dma_platform;
index b928ef7d28eb82461e7ac3513bef6534d2addf75..6644cba7cbf20e5a16e75ad459df1c2663afcc93 100644 (file)
@@ -55,7 +55,7 @@ static __init int pcm030_fabric_init(void)
        struct platform_device *pdev;
        int rc;
 
-       if (!machine_is_compatible("phytec,pcm030"))
+       if (!of_machine_is_compatible("phytec,pcm030"))
                return -ENODEV;
 
        card.platform = &mpc5200_audio_dma_platform;