aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/powerpc/kernel/pci_64.c2
-rw-r--r--arch/powerpc/platforms/85xx/xes_mpc85xx.c4
-rw-r--r--arch/powerpc/platforms/cell/cbe_powerbutton.c2
-rw-r--r--arch/powerpc/platforms/cell/ras.c2
-rw-r--r--arch/powerpc/platforms/pasemi/cpufreq.c4
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_32.c14
-rw-r--r--arch/powerpc/platforms/powermac/cpufreq_64.c14
-rw-r--r--arch/powerpc/platforms/powermac/feature.c2
-rw-r--r--arch/powerpc/platforms/powermac/smp.c12
-rw-r--r--arch/powerpc/platforms/powermac/time.c8
-rw-r--r--arch/powerpc/platforms/powermac/udbg_scc.c6
-rw-r--r--arch/powerpc/sysdev/grackle.c4
-rw-r--r--drivers/char/hvc_beat.c2
-rw-r--r--drivers/gpu/drm/radeon/radeon_combios.c44
-rw-r--r--drivers/macintosh/adb.c4
-rw-r--r--drivers/macintosh/therm_pm72.c8
-rw-r--r--drivers/macintosh/therm_windtunnel.c2
-rw-r--r--drivers/macintosh/via-pmu-backlight.c8
-rw-r--r--drivers/macintosh/via-pmu.c8
-rw-r--r--drivers/macintosh/windfarm_core.c6
-rw-r--r--drivers/macintosh/windfarm_cpufreq_clamp.c6
-rw-r--r--drivers/macintosh/windfarm_lm75_sensor.c6
-rw-r--r--drivers/macintosh/windfarm_max6690_sensor.c6
-rw-r--r--drivers/macintosh/windfarm_pm112.c2
-rw-r--r--drivers/macintosh/windfarm_pm121.c2
-rw-r--r--drivers/macintosh/windfarm_pm81.c4
-rw-r--r--drivers/macintosh/windfarm_pm91.c2
-rw-r--r--drivers/macintosh/windfarm_smu_sensors.c6
-rw-r--r--drivers/net/mace.c2
-rw-r--r--drivers/of/base.c6
-rw-r--r--drivers/serial/pmac_zilog.c6
-rw-r--r--drivers/video/aty/aty128fb.c14
-rw-r--r--drivers/video/aty/atyfb_base.c8
-rw-r--r--drivers/video/aty/radeon_backlight.c6
-rw-r--r--include/linux/of_fdt.h2
-rw-r--r--sound/ppc/awacs.c24
-rw-r--r--sound/ppc/burgundy.c4
-rw-r--r--sound/ppc/pmac.c18
-rw-r--r--sound/soc/fsl/efika-audio-fabric.c2
-rw-r--r--sound/soc/fsl/pcm030-audio-fabric.c2
40 files changed, 142 insertions, 142 deletions
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index ccf56ac92de5..d43fc65749c1 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -224,7 +224,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
224 * G5 machines... So when something asks for bus 0 io base 224 * G5 machines... So when something asks for bus 0 io base
225 * (bus 0 is HT root), we return the AGP one instead. 225 * (bus 0 is HT root), we return the AGP one instead.
226 */ 226 */
227 if (in_bus == 0 && machine_is_compatible("MacRISC4")) { 227 if (in_bus == 0 && of_machine_is_compatible("MacRISC4")) {
228 struct device_node *agp; 228 struct device_node *agp;
229 229
230 agp = of_find_compatible_node(NULL, NULL, "u3-agp"); 230 agp = of_find_compatible_node(NULL, NULL, "u3-agp");
diff --git a/arch/powerpc/platforms/85xx/xes_mpc85xx.c b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
index 1b426050a2f9..0125604d096e 100644
--- a/arch/powerpc/platforms/85xx/xes_mpc85xx.c
+++ b/arch/powerpc/platforms/85xx/xes_mpc85xx.c
@@ -80,8 +80,8 @@ static void xes_mpc85xx_configure_l2(void __iomem *l2_base)
80 printk(KERN_INFO "xes_mpc85xx: Enabling L2 as cache\n"); 80 printk(KERN_INFO "xes_mpc85xx: Enabling L2 as cache\n");
81 81
82 ctl = MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2I; 82 ctl = MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2I;
83 if (machine_is_compatible("MPC8540") || 83 if (of_machine_is_compatible("MPC8540") ||
84 machine_is_compatible("MPC8560")) 84 of_machine_is_compatible("MPC8560"))
85 /* 85 /*
86 * Assume L2 SRAM is used fully for cache, so set 86 * Assume L2 SRAM is used fully for cache, so set
87 * L2BLKSZ (bits 4:5) to match L2SIZ (bits 2:3). 87 * L2BLKSZ (bits 4:5) to match L2SIZ (bits 2:3).
diff --git a/arch/powerpc/platforms/cell/cbe_powerbutton.c b/arch/powerpc/platforms/cell/cbe_powerbutton.c
index dcddaa5fcb66..f75a4daa4ca2 100644
--- a/arch/powerpc/platforms/cell/cbe_powerbutton.c
+++ b/arch/powerpc/platforms/cell/cbe_powerbutton.c
@@ -48,7 +48,7 @@ static int __init cbe_powerbutton_init(void)
48 int ret = 0; 48 int ret = 0;
49 struct input_dev *dev; 49 struct input_dev *dev;
50 50
51 if (!machine_is_compatible("IBM,CBPLUS-1.0")) { 51 if (!of_machine_is_compatible("IBM,CBPLUS-1.0")) {
52 printk(KERN_ERR "%s: Not a cell blade.\n", __func__); 52 printk(KERN_ERR "%s: Not a cell blade.\n", __func__);
53 ret = -ENODEV; 53 ret = -ENODEV;
54 goto out; 54 goto out;
diff --git a/arch/powerpc/platforms/cell/ras.c b/arch/powerpc/platforms/cell/ras.c
index 5e0a191764fc..608fd2b584c9 100644
--- a/arch/powerpc/platforms/cell/ras.c
+++ b/arch/powerpc/platforms/cell/ras.c
@@ -255,7 +255,7 @@ static int __init cbe_sysreset_init(void)
255{ 255{
256 struct cbe_pmd_regs __iomem *regs; 256 struct cbe_pmd_regs __iomem *regs;
257 257
258 sysreset_hack = machine_is_compatible("IBM,CBPLUS-1.0"); 258 sysreset_hack = of_machine_is_compatible("IBM,CBPLUS-1.0");
259 if (!sysreset_hack) 259 if (!sysreset_hack)
260 return 0; 260 return 0;
261 261
diff --git a/arch/powerpc/platforms/pasemi/cpufreq.c b/arch/powerpc/platforms/pasemi/cpufreq.c
index be2527a516ea..d35e0520abf0 100644
--- a/arch/powerpc/platforms/pasemi/cpufreq.c
+++ b/arch/powerpc/platforms/pasemi/cpufreq.c
@@ -304,8 +304,8 @@ static struct cpufreq_driver pas_cpufreq_driver = {
304 304
305static int __init pas_cpufreq_init(void) 305static int __init pas_cpufreq_init(void)
306{ 306{
307 if (!machine_is_compatible("PA6T-1682M") && 307 if (!of_machine_is_compatible("PA6T-1682M") &&
308 !machine_is_compatible("pasemi,pwrficient")) 308 !of_machine_is_compatible("pasemi,pwrficient"))
309 return -ENODEV; 309 return -ENODEV;
310 310
311 return cpufreq_register_driver(&pas_cpufreq_driver); 311 return cpufreq_register_driver(&pas_cpufreq_driver);
diff --git a/arch/powerpc/platforms/powermac/cpufreq_32.c b/arch/powerpc/platforms/powermac/cpufreq_32.c
index 08d94e4cedd3..d4f127d18141 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_32.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_32.c
@@ -657,31 +657,31 @@ static int __init pmac_cpufreq_setup(void)
657 cur_freq = (*value) / 1000; 657 cur_freq = (*value) / 1000;
658 658
659 /* Check for 7447A based MacRISC3 */ 659 /* Check for 7447A based MacRISC3 */
660 if (machine_is_compatible("MacRISC3") && 660 if (of_machine_is_compatible("MacRISC3") &&
661 of_get_property(cpunode, "dynamic-power-step", NULL) && 661 of_get_property(cpunode, "dynamic-power-step", NULL) &&
662 PVR_VER(mfspr(SPRN_PVR)) == 0x8003) { 662 PVR_VER(mfspr(SPRN_PVR)) == 0x8003) {
663 pmac_cpufreq_init_7447A(cpunode); 663 pmac_cpufreq_init_7447A(cpunode);
664 /* Check for other MacRISC3 machines */ 664 /* Check for other MacRISC3 machines */
665 } else if (machine_is_compatible("PowerBook3,4") || 665 } else if (of_machine_is_compatible("PowerBook3,4") ||
666 machine_is_compatible("PowerBook3,5") || 666 of_machine_is_compatible("PowerBook3,5") ||
667 machine_is_compatible("MacRISC3")) { 667 of_machine_is_compatible("MacRISC3")) {
668 pmac_cpufreq_init_MacRISC3(cpunode); 668 pmac_cpufreq_init_MacRISC3(cpunode);
669 /* Else check for iBook2 500/600 */ 669 /* Else check for iBook2 500/600 */
670 } else if (machine_is_compatible("PowerBook4,1")) { 670 } else if (of_machine_is_compatible("PowerBook4,1")) {
671 hi_freq = cur_freq; 671 hi_freq = cur_freq;
672 low_freq = 400000; 672 low_freq = 400000;
673 set_speed_proc = pmu_set_cpu_speed; 673 set_speed_proc = pmu_set_cpu_speed;
674 is_pmu_based = 1; 674 is_pmu_based = 1;
675 } 675 }
676 /* Else check for TiPb 550 */ 676 /* Else check for TiPb 550 */
677 else if (machine_is_compatible("PowerBook3,3") && cur_freq == 550000) { 677 else if (of_machine_is_compatible("PowerBook3,3") && cur_freq == 550000) {
678 hi_freq = cur_freq; 678 hi_freq = cur_freq;
679 low_freq = 500000; 679 low_freq = 500000;
680 set_speed_proc = pmu_set_cpu_speed; 680 set_speed_proc = pmu_set_cpu_speed;
681 is_pmu_based = 1; 681 is_pmu_based = 1;
682 } 682 }
683 /* Else check for TiPb 400 & 500 */ 683 /* Else check for TiPb 400 & 500 */
684 else if (machine_is_compatible("PowerBook3,2")) { 684 else if (of_machine_is_compatible("PowerBook3,2")) {
685 /* We only know about the 400 MHz and the 500Mhz model 685 /* We only know about the 400 MHz and the 500Mhz model
686 * they both have 300 MHz as low frequency 686 * they both have 300 MHz as low frequency
687 */ 687 */
diff --git a/arch/powerpc/platforms/powermac/cpufreq_64.c b/arch/powerpc/platforms/powermac/cpufreq_64.c
index 708c75133377..3ed288e68ec4 100644
--- a/arch/powerpc/platforms/powermac/cpufreq_64.c
+++ b/arch/powerpc/platforms/powermac/cpufreq_64.c
@@ -398,11 +398,11 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
398 int rc = -ENODEV; 398 int rc = -ENODEV;
399 399
400 /* Check supported platforms */ 400 /* Check supported platforms */
401 if (machine_is_compatible("PowerMac8,1") || 401 if (of_machine_is_compatible("PowerMac8,1") ||
402 machine_is_compatible("PowerMac8,2") || 402 of_machine_is_compatible("PowerMac8,2") ||
403 machine_is_compatible("PowerMac9,1")) 403 of_machine_is_compatible("PowerMac9,1"))
404 use_volts_smu = 1; 404 use_volts_smu = 1;
405 else if (machine_is_compatible("PowerMac11,2")) 405 else if (of_machine_is_compatible("PowerMac11,2"))
406 use_volts_vdnap = 1; 406 use_volts_vdnap = 1;
407 else 407 else
408 return -ENODEV; 408 return -ENODEV;
@@ -729,9 +729,9 @@ static int __init g5_cpufreq_init(void)
729 return -ENODEV; 729 return -ENODEV;
730 } 730 }
731 731
732 if (machine_is_compatible("PowerMac7,2") || 732 if (of_machine_is_compatible("PowerMac7,2") ||
733 machine_is_compatible("PowerMac7,3") || 733 of_machine_is_compatible("PowerMac7,3") ||
734 machine_is_compatible("RackMac3,1")) 734 of_machine_is_compatible("RackMac3,1"))
735 rc = g5_pm72_cpufreq_init(cpus); 735 rc = g5_pm72_cpufreq_init(cpus);
736#ifdef CONFIG_PMAC_SMU 736#ifdef CONFIG_PMAC_SMU
737 else 737 else
diff --git a/arch/powerpc/platforms/powermac/feature.c b/arch/powerpc/platforms/powermac/feature.c
index fbc9bbd74dbd..33e815f4466c 100644
--- a/arch/powerpc/platforms/powermac/feature.c
+++ b/arch/powerpc/platforms/powermac/feature.c
@@ -2426,7 +2426,7 @@ static int __init probe_motherboard(void)
2426 } 2426 }
2427 } 2427 }
2428 for(i=0; i<ARRAY_SIZE(pmac_mb_defs); i++) { 2428 for(i=0; i<ARRAY_SIZE(pmac_mb_defs); i++) {
2429 if (machine_is_compatible(pmac_mb_defs[i].model_string)) { 2429 if (of_machine_is_compatible(pmac_mb_defs[i].model_string)) {
2430 pmac_mb = pmac_mb_defs[i]; 2430 pmac_mb = pmac_mb_defs[i];
2431 goto found; 2431 goto found;
2432 } 2432 }
diff --git a/arch/powerpc/platforms/powermac/smp.c b/arch/powerpc/platforms/powermac/smp.c
index b40c22d697f0..6898e8241cd0 100644
--- a/arch/powerpc/platforms/powermac/smp.c
+++ b/arch/powerpc/platforms/powermac/smp.c
@@ -693,9 +693,9 @@ static void __init smp_core99_setup(int ncpus)
693#ifdef CONFIG_PPC64 693#ifdef CONFIG_PPC64
694 694
695 /* i2c based HW sync on some G5s */ 695 /* i2c based HW sync on some G5s */
696 if (machine_is_compatible("PowerMac7,2") || 696 if (of_machine_is_compatible("PowerMac7,2") ||
697 machine_is_compatible("PowerMac7,3") || 697 of_machine_is_compatible("PowerMac7,3") ||
698 machine_is_compatible("RackMac3,1")) 698 of_machine_is_compatible("RackMac3,1"))
699 smp_core99_setup_i2c_hwsync(ncpus); 699 smp_core99_setup_i2c_hwsync(ncpus);
700 700
701 /* pfunc based HW sync on recent G5s */ 701 /* pfunc based HW sync on recent G5s */
@@ -713,7 +713,7 @@ static void __init smp_core99_setup(int ncpus)
713#else /* CONFIG_PPC64 */ 713#else /* CONFIG_PPC64 */
714 714
715 /* GPIO based HW sync on ppc32 Core99 */ 715 /* GPIO based HW sync on ppc32 Core99 */
716 if (pmac_tb_freeze == NULL && !machine_is_compatible("MacRISC4")) { 716 if (pmac_tb_freeze == NULL && !of_machine_is_compatible("MacRISC4")) {
717 struct device_node *cpu; 717 struct device_node *cpu;
718 const u32 *tbprop = NULL; 718 const u32 *tbprop = NULL;
719 719
@@ -750,7 +750,7 @@ static void __init smp_core99_setup(int ncpus)
750#endif 750#endif
751 751
752 /* 32 bits SMP can't NAP */ 752 /* 32 bits SMP can't NAP */
753 if (!machine_is_compatible("MacRISC4")) 753 if (!of_machine_is_compatible("MacRISC4"))
754 powersave_nap = 0; 754 powersave_nap = 0;
755} 755}
756 756
@@ -852,7 +852,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr)
852 /* If we didn't start the second CPU, we must take 852 /* If we didn't start the second CPU, we must take
853 * it off the bus 853 * it off the bus
854 */ 854 */
855 if (machine_is_compatible("MacRISC4") && 855 if (of_machine_is_compatible("MacRISC4") &&
856 num_online_cpus() < 2) 856 num_online_cpus() < 2)
857 g5_phy_disable_cpu1(); 857 g5_phy_disable_cpu1();
858#endif /* CONFIG_PPC64 */ 858#endif /* CONFIG_PPC64 */
diff --git a/arch/powerpc/platforms/powermac/time.c b/arch/powerpc/platforms/powermac/time.c
index 1810e4226e56..48211ca134c3 100644
--- a/arch/powerpc/platforms/powermac/time.c
+++ b/arch/powerpc/platforms/powermac/time.c
@@ -317,9 +317,9 @@ void __init pmac_calibrate_decr(void)
317 * calibration. That's better since the VIA itself seems 317 * calibration. That's better since the VIA itself seems
318 * to be slightly off. --BenH 318 * to be slightly off. --BenH
319 */ 319 */
320 if (!machine_is_compatible("MacRISC2") && 320 if (!of_machine_is_compatible("MacRISC2") &&
321 !machine_is_compatible("MacRISC3") && 321 !of_machine_is_compatible("MacRISC3") &&
322 !machine_is_compatible("MacRISC4")) 322 !of_machine_is_compatible("MacRISC4"))
323 if (via_calibrate_decr()) 323 if (via_calibrate_decr())
324 return; 324 return;
325 325
@@ -328,7 +328,7 @@ void __init pmac_calibrate_decr(void)
328 * probably implement calibration based on the KL timer on these 328 * probably implement calibration based on the KL timer on these
329 * machines anyway... -BenH 329 * machines anyway... -BenH
330 */ 330 */
331 if (machine_is_compatible("PowerMac3,5")) 331 if (of_machine_is_compatible("PowerMac3,5"))
332 if (via_calibrate_decr()) 332 if (via_calibrate_decr())
333 return; 333 return;
334#endif 334#endif
diff --git a/arch/powerpc/platforms/powermac/udbg_scc.c b/arch/powerpc/platforms/powermac/udbg_scc.c
index 9490157da62e..d83135a9830e 100644
--- a/arch/powerpc/platforms/powermac/udbg_scc.c
+++ b/arch/powerpc/platforms/powermac/udbg_scc.c
@@ -132,9 +132,9 @@ void udbg_scc_init(int force_scc)
132 scc_inittab[1] = in_8(sccc); 132 scc_inittab[1] = in_8(sccc);
133 out_8(sccc, 12); 133 out_8(sccc, 12);
134 scc_inittab[3] = in_8(sccc); 134 scc_inittab[3] = in_8(sccc);
135 } else if (machine_is_compatible("RackMac1,1") 135 } else if (of_machine_is_compatible("RackMac1,1")
136 || machine_is_compatible("RackMac1,2") 136 || of_machine_is_compatible("RackMac1,2")
137 || machine_is_compatible("MacRISC4")) { 137 || of_machine_is_compatible("MacRISC4")) {
138 /* Xserves and G5s default to 57600 */ 138 /* Xserves and G5s default to 57600 */
139 scc_inittab[1] = 0; 139 scc_inittab[1] = 0;
140 scc_inittab[3] = 0; 140 scc_inittab[3] = 0;
diff --git a/arch/powerpc/sysdev/grackle.c b/arch/powerpc/sysdev/grackle.c
index 5da37c2f22ee..cf27df6e508b 100644
--- a/arch/powerpc/sysdev/grackle.c
+++ b/arch/powerpc/sysdev/grackle.c
@@ -56,9 +56,9 @@ static inline void grackle_set_loop_snoop(struct pci_controller *bp, int enable)
56void __init setup_grackle(struct pci_controller *hose) 56void __init setup_grackle(struct pci_controller *hose)
57{ 57{
58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0); 58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0);
59 if (machine_is_compatible("PowerMac1,1")) 59 if (of_machine_is_compatible("PowerMac1,1"))
60 ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS); 60 ppc_pci_add_flags(PPC_PCI_REASSIGN_ALL_BUS);
61 if (machine_is_compatible("AAPL,PowerBook1998")) 61 if (of_machine_is_compatible("AAPL,PowerBook1998"))
62 grackle_set_loop_snoop(hose, 1); 62 grackle_set_loop_snoop(hose, 1);
63#if 0 /* Disabled for now, HW problems ??? */ 63#if 0 /* Disabled for now, HW problems ??? */
64 grackle_set_stg(hose, 1); 64 grackle_set_stg(hose, 1);
diff --git a/drivers/char/hvc_beat.c b/drivers/char/hvc_beat.c
index 0afc8b82212e..9b397c5ee1d7 100644
--- a/drivers/char/hvc_beat.c
+++ b/drivers/char/hvc_beat.c
@@ -99,7 +99,7 @@ static int hvc_beat_config(char *p)
99 99
100static int __init hvc_beat_console_init(void) 100static int __init hvc_beat_console_init(void)
101{ 101{
102 if (hvc_beat_useit && machine_is_compatible("Beat")) { 102 if (hvc_beat_useit && of_machine_is_compatible("Beat")) {
103 hvc_instantiate(0, 0, &hvc_beat_get_put_ops); 103 hvc_instantiate(0, 0, &hvc_beat_get_put_ops);
104 } 104 }
105 return 0; 105 return 0;
diff --git a/drivers/gpu/drm/radeon/radeon_combios.c b/drivers/gpu/drm/radeon/radeon_combios.c
index 579c8920e081..13826a534065 100644
--- a/drivers/gpu/drm/radeon/radeon_combios.c
+++ b/drivers/gpu/drm/radeon/radeon_combios.c
@@ -1280,47 +1280,47 @@ bool radeon_get_legacy_connector_info_from_table(struct drm_device *dev)
1280 rdev->mode_info.connector_table = radeon_connector_table; 1280 rdev->mode_info.connector_table = radeon_connector_table;
1281 if (rdev->mode_info.connector_table == CT_NONE) { 1281 if (rdev->mode_info.connector_table == CT_NONE) {
1282#ifdef CONFIG_PPC_PMAC 1282#ifdef CONFIG_PPC_PMAC
1283 if (machine_is_compatible("PowerBook3,3")) { 1283 if (of_machine_is_compatible("PowerBook3,3")) {
1284 /* powerbook with VGA */ 1284 /* powerbook with VGA */
1285 rdev->mode_info.connector_table = CT_POWERBOOK_VGA; 1285 rdev->mode_info.connector_table = CT_POWERBOOK_VGA;
1286 } else if (machine_is_compatible("PowerBook3,4") || 1286 } else if (of_machine_is_compatible("PowerBook3,4") ||
1287 machine_is_compatible("PowerBook3,5")) { 1287 of_machine_is_compatible("PowerBook3,5")) {
1288 /* powerbook with internal tmds */ 1288 /* powerbook with internal tmds */
1289 rdev->mode_info.connector_table = CT_POWERBOOK_INTERNAL; 1289 rdev->mode_info.connector_table = CT_POWERBOOK_INTERNAL;
1290 } else if (machine_is_compatible("PowerBook5,1") || 1290 } else if (of_machine_is_compatible("PowerBook5,1") ||
1291 machine_is_compatible("PowerBook5,2") || 1291 of_machine_is_compatible("PowerBook5,2") ||
1292 machine_is_compatible("PowerBook5,3") || 1292 of_machine_is_compatible("PowerBook5,3") ||
1293 machine_is_compatible("PowerBook5,4") || 1293 of_machine_is_compatible("PowerBook5,4") ||
1294 machine_is_compatible("PowerBook5,5")) { 1294 of_machine_is_compatible("PowerBook5,5")) {
1295 /* powerbook with external single link tmds (sil164) */ 1295 /* powerbook with external single link tmds (sil164) */
1296 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; 1296 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL;
1297 } else if (machine_is_compatible("PowerBook5,6")) { 1297 } else if (of_machine_is_compatible("PowerBook5,6")) {
1298 /* powerbook with external dual or single link tmds */ 1298 /* powerbook with external dual or single link tmds */
1299 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; 1299 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL;
1300 } else if (machine_is_compatible("PowerBook5,7") || 1300 } else if (of_machine_is_compatible("PowerBook5,7") ||
1301 machine_is_compatible("PowerBook5,8") || 1301 of_machine_is_compatible("PowerBook5,8") ||
1302 machine_is_compatible("PowerBook5,9")) { 1302 of_machine_is_compatible("PowerBook5,9")) {
1303 /* PowerBook6,2 ? */ 1303 /* PowerBook6,2 ? */
1304 /* powerbook with external dual link tmds (sil1178?) */ 1304 /* powerbook with external dual link tmds (sil1178?) */
1305 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; 1305 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL;
1306 } else if (machine_is_compatible("PowerBook4,1") || 1306 } else if (of_machine_is_compatible("PowerBook4,1") ||
1307 machine_is_compatible("PowerBook4,2") || 1307 of_machine_is_compatible("PowerBook4,2") ||
1308 machine_is_compatible("PowerBook4,3") || 1308 of_machine_is_compatible("PowerBook4,3") ||
1309 machine_is_compatible("PowerBook6,3") || 1309 of_machine_is_compatible("PowerBook6,3") ||
1310 machine_is_compatible("PowerBook6,5") || 1310 of_machine_is_compatible("PowerBook6,5") ||
1311 machine_is_compatible("PowerBook6,7")) { 1311 of_machine_is_compatible("PowerBook6,7")) {
1312 /* ibook */ 1312 /* ibook */
1313 rdev->mode_info.connector_table = CT_IBOOK; 1313 rdev->mode_info.connector_table = CT_IBOOK;
1314 } else if (machine_is_compatible("PowerMac4,4")) { 1314 } else if (of_machine_is_compatible("PowerMac4,4")) {
1315 /* emac */ 1315 /* emac */
1316 rdev->mode_info.connector_table = CT_EMAC; 1316 rdev->mode_info.connector_table = CT_EMAC;
1317 } else if (machine_is_compatible("PowerMac10,1")) { 1317 } else if (of_machine_is_compatible("PowerMac10,1")) {
1318 /* mini with internal tmds */ 1318 /* mini with internal tmds */
1319 rdev->mode_info.connector_table = CT_MINI_INTERNAL; 1319 rdev->mode_info.connector_table = CT_MINI_INTERNAL;
1320 } else if (machine_is_compatible("PowerMac10,2")) { 1320 } else if (of_machine_is_compatible("PowerMac10,2")) {
1321 /* mini with external tmds */ 1321 /* mini with external tmds */
1322 rdev->mode_info.connector_table = CT_MINI_EXTERNAL; 1322 rdev->mode_info.connector_table = CT_MINI_EXTERNAL;
1323 } else if (machine_is_compatible("PowerMac12,1")) { 1323 } else if (of_machine_is_compatible("PowerMac12,1")) {
1324 /* PowerMac8,1 ? */ 1324 /* PowerMac8,1 ? */
1325 /* imac g5 isight */ 1325 /* imac g5 isight */
1326 rdev->mode_info.connector_table = CT_IMAC_G5_ISIGHT; 1326 rdev->mode_info.connector_table = CT_IMAC_G5_ISIGHT;
diff --git a/drivers/macintosh/adb.c b/drivers/macintosh/adb.c
index 23741cec45e3..d840a109f833 100644
--- a/drivers/macintosh/adb.c
+++ b/drivers/macintosh/adb.c
@@ -322,8 +322,8 @@ static int __init adb_init(void)
322 adb_controller = NULL; 322 adb_controller = NULL;
323 } else { 323 } else {
324#ifdef CONFIG_PPC 324#ifdef CONFIG_PPC
325 if (machine_is_compatible("AAPL,PowerBook1998") || 325 if (of_machine_is_compatible("AAPL,PowerBook1998") ||
326 machine_is_compatible("PowerBook1,1")) 326 of_machine_is_compatible("PowerBook1,1"))
327 sleepy_trackpad = 1; 327 sleepy_trackpad = 1;
328#endif /* CONFIG_PPC */ 328#endif /* CONFIG_PPC */
329 329
diff --git a/drivers/macintosh/therm_pm72.c b/drivers/macintosh/therm_pm72.c
index 454bc501df3c..5738d8bf2d97 100644
--- a/drivers/macintosh/therm_pm72.c
+++ b/drivers/macintosh/therm_pm72.c
@@ -1899,7 +1899,7 @@ static int create_control_loops(void)
1899 */ 1899 */
1900 if (rackmac) 1900 if (rackmac)
1901 cpu_pid_type = CPU_PID_TYPE_RACKMAC; 1901 cpu_pid_type = CPU_PID_TYPE_RACKMAC;
1902 else if (machine_is_compatible("PowerMac7,3") 1902 else if (of_machine_is_compatible("PowerMac7,3")
1903 && (cpu_count > 1) 1903 && (cpu_count > 1)
1904 && fcu_fans[CPUA_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID 1904 && fcu_fans[CPUA_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID
1905 && fcu_fans[CPUB_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID) { 1905 && fcu_fans[CPUB_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID) {
@@ -2234,10 +2234,10 @@ static int __init therm_pm72_init(void)
2234{ 2234{
2235 struct device_node *np; 2235 struct device_node *np;
2236 2236
2237 rackmac = machine_is_compatible("RackMac3,1"); 2237 rackmac = of_machine_is_compatible("RackMac3,1");
2238 2238
2239 if (!machine_is_compatible("PowerMac7,2") && 2239 if (!of_machine_is_compatible("PowerMac7,2") &&
2240 !machine_is_compatible("PowerMac7,3") && 2240 !of_machine_is_compatible("PowerMac7,3") &&
2241 !rackmac) 2241 !rackmac)
2242 return -ENODEV; 2242 return -ENODEV;
2243 2243
diff --git a/drivers/macintosh/therm_windtunnel.c b/drivers/macintosh/therm_windtunnel.c
index ba48fd76396e..7fb8b4da35a7 100644
--- a/drivers/macintosh/therm_windtunnel.c
+++ b/drivers/macintosh/therm_windtunnel.c
@@ -490,7 +490,7 @@ g4fan_init( void )
490 info = of_get_property(np, "thermal-info", NULL); 490 info = of_get_property(np, "thermal-info", NULL);
491 of_node_put(np); 491 of_node_put(np);
492 492
493 if( !info || !machine_is_compatible("PowerMac3,6") ) 493 if( !info || !of_machine_is_compatible("PowerMac3,6") )
494 return -ENODEV; 494 return -ENODEV;
495 495
496 if( info->id != 3 ) { 496 if( info->id != 3 ) {
diff --git a/drivers/macintosh/via-pmu-backlight.c b/drivers/macintosh/via-pmu-backlight.c
index a348bb0791d3..4f3c4479c16a 100644
--- a/drivers/macintosh/via-pmu-backlight.c
+++ b/drivers/macintosh/via-pmu-backlight.c
@@ -150,13 +150,13 @@ void __init pmu_backlight_init()
150 150
151 /* Special case for the old PowerBook since I can't test on it */ 151 /* Special case for the old PowerBook since I can't test on it */
152 autosave = 152 autosave =
153 machine_is_compatible("AAPL,3400/2400") || 153 of_machine_is_compatible("AAPL,3400/2400") ||
154 machine_is_compatible("AAPL,3500"); 154 of_machine_is_compatible("AAPL,3500");
155 155
156 if (!autosave && 156 if (!autosave &&
157 !pmac_has_backlight_type("pmu") && 157 !pmac_has_backlight_type("pmu") &&
158 !machine_is_compatible("AAPL,PowerBook1998") && 158 !of_machine_is_compatible("AAPL,PowerBook1998") &&
159 !machine_is_compatible("PowerBook1,1")) 159 !of_machine_is_compatible("PowerBook1,1"))
160 return; 160 return;
161 161
162 snprintf(name, sizeof(name), "pmubl"); 162 snprintf(name, sizeof(name), "pmubl");
diff --git a/drivers/macintosh/via-pmu.c b/drivers/macintosh/via-pmu.c
index db379c381432..42764849eb78 100644
--- a/drivers/macintosh/via-pmu.c
+++ b/drivers/macintosh/via-pmu.c
@@ -463,8 +463,8 @@ static int __init via_pmu_dev_init(void)
463#endif 463#endif
464 464
465#ifdef CONFIG_PPC32 465#ifdef CONFIG_PPC32
466 if (machine_is_compatible("AAPL,3400/2400") || 466 if (of_machine_is_compatible("AAPL,3400/2400") ||
467 machine_is_compatible("AAPL,3500")) { 467 of_machine_is_compatible("AAPL,3500")) {
468 int mb = pmac_call_feature(PMAC_FTR_GET_MB_INFO, 468 int mb = pmac_call_feature(PMAC_FTR_GET_MB_INFO,
469 NULL, PMAC_MB_INFO_MODEL, 0); 469 NULL, PMAC_MB_INFO_MODEL, 0);
470 pmu_battery_count = 1; 470 pmu_battery_count = 1;
@@ -472,8 +472,8 @@ static int __init via_pmu_dev_init(void)
472 pmu_batteries[0].flags |= PMU_BATT_TYPE_COMET; 472 pmu_batteries[0].flags |= PMU_BATT_TYPE_COMET;
473 else 473 else
474 pmu_batteries[0].flags |= PMU_BATT_TYPE_HOOPER; 474 pmu_batteries[0].flags |= PMU_BATT_TYPE_HOOPER;
475 } else if (machine_is_compatible("AAPL,PowerBook1998") || 475 } else if (of_machine_is_compatible("AAPL,PowerBook1998") ||
476 machine_is_compatible("PowerBook1,1")) { 476 of_machine_is_compatible("PowerBook1,1")) {
477 pmu_battery_count = 2; 477 pmu_battery_count = 2;
478 pmu_batteries[0].flags |= PMU_BATT_TYPE_SMART; 478 pmu_batteries[0].flags |= PMU_BATT_TYPE_SMART;
479 pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART; 479 pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART;
diff --git a/drivers/macintosh/windfarm_core.c b/drivers/macintosh/windfarm_core.c
index 075b4d99e354..437f55c5d18d 100644
--- a/drivers/macintosh/windfarm_core.c
+++ b/drivers/macintosh/windfarm_core.c
@@ -468,9 +468,9 @@ static int __init windfarm_core_init(void)
468 DBG("wf: core loaded\n"); 468 DBG("wf: core loaded\n");
469 469
470 /* Don't register on old machines that use therm_pm72 for now */ 470 /* Don't register on old machines that use therm_pm72 for now */
471 if (machine_is_compatible("PowerMac7,2") || 471 if (of_machine_is_compatible("PowerMac7,2") ||
472 machine_is_compatible("PowerMac7,3") || 472 of_machine_is_compatible("PowerMac7,3") ||
473 machine_is_compatible("RackMac3,1")) 473 of_machine_is_compatible("RackMac3,1"))
474 return -ENODEV; 474 return -ENODEV;
475 platform_device_register(&wf_platform_device); 475 platform_device_register(&wf_platform_device);
476 return 0; 476 return 0;
diff --git a/drivers/macintosh/windfarm_cpufreq_clamp.c b/drivers/macintosh/windfarm_cpufreq_clamp.c
index 900aade06198..1a77a7c97d0e 100644
--- a/drivers/macintosh/windfarm_cpufreq_clamp.c
+++ b/drivers/macintosh/windfarm_cpufreq_clamp.c
@@ -76,9 +76,9 @@ static int __init wf_cpufreq_clamp_init(void)
76 struct wf_control *clamp; 76 struct wf_control *clamp;
77 77
78 /* Don't register on old machines that use therm_pm72 for now */ 78 /* Don't register on old machines that use therm_pm72 for now */
79 if (machine_is_compatible("PowerMac7,2") || 79 if (of_machine_is_compatible("PowerMac7,2") ||
80 machine_is_compatible("PowerMac7,3") || 80 of_machine_is_compatible("PowerMac7,3") ||
81 machine_is_compatible("RackMac3,1")) 81 of_machine_is_compatible("RackMac3,1"))
82 return -ENODEV; 82 return -ENODEV;
83 83
84 clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL); 84 clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL);
diff --git a/drivers/macintosh/windfarm_lm75_sensor.c b/drivers/macintosh/windfarm_lm75_sensor.c
index ed6426a10773..d8257d35afde 100644
--- a/drivers/macintosh/windfarm_lm75_sensor.c
+++ b/drivers/macintosh/windfarm_lm75_sensor.c
@@ -239,9 +239,9 @@ static struct i2c_driver wf_lm75_driver = {
239static int __init wf_lm75_sensor_init(void) 239static int __init wf_lm75_sensor_init(void)
240{ 240{
241 /* Don't register on old machines that use therm_pm72 for now */ 241 /* Don't register on old machines that use therm_pm72 for now */
242 if (machine_is_compatible("PowerMac7,2") || 242 if (of_machine_is_compatible("PowerMac7,2") ||
243 machine_is_compatible("PowerMac7,3") || 243 of_machine_is_compatible("PowerMac7,3") ||
244 machine_is_compatible("RackMac3,1")) 244 of_machine_is_compatible("RackMac3,1"))
245 return -ENODEV; 245 return -ENODEV;
246 return i2c_add_driver(&wf_lm75_driver); 246 return i2c_add_driver(&wf_lm75_driver);
247} 247}
diff --git a/drivers/macintosh/windfarm_max6690_sensor.c b/drivers/macintosh/windfarm_max6690_sensor.c
index a67b349319e9..b486eb929fde 100644
--- a/drivers/macintosh/windfarm_max6690_sensor.c
+++ b/drivers/macintosh/windfarm_max6690_sensor.c
@@ -188,9 +188,9 @@ static struct i2c_driver wf_max6690_driver = {
188static int __init wf_max6690_sensor_init(void) 188static int __init wf_max6690_sensor_init(void)
189{ 189{
190 /* Don't register on old machines that use therm_pm72 for now */ 190 /* Don't register on old machines that use therm_pm72 for now */
191 if (machine_is_compatible("PowerMac7,2") || 191 if (of_machine_is_compatible("PowerMac7,2") ||
192 machine_is_compatible("PowerMac7,3") || 192 of_machine_is_compatible("PowerMac7,3") ||
193 machine_is_compatible("RackMac3,1")) 193 of_machine_is_compatible("RackMac3,1"))
194 return -ENODEV; 194 return -ENODEV;
195 return i2c_add_driver(&wf_max6690_driver); 195 return i2c_add_driver(&wf_max6690_driver);
196} 196}
diff --git a/drivers/macintosh/windfarm_pm112.c b/drivers/macintosh/windfarm_pm112.c
index 73d695dc9e50..e0ee80700cde 100644
--- a/drivers/macintosh/windfarm_pm112.c
+++ b/drivers/macintosh/windfarm_pm112.c
@@ -676,7 +676,7 @@ static int __init wf_pm112_init(void)
676{ 676{
677 struct device_node *cpu; 677 struct device_node *cpu;
678 678
679 if (!machine_is_compatible("PowerMac11,2")) 679 if (!of_machine_is_compatible("PowerMac11,2"))
680 return -ENODEV; 680 return -ENODEV;
681 681
682 /* Count the number of CPU cores */ 682 /* Count the number of CPU cores */
diff --git a/drivers/macintosh/windfarm_pm121.c b/drivers/macintosh/windfarm_pm121.c
index 66ec4fb115bb..947d4afa25ca 100644
--- a/drivers/macintosh/windfarm_pm121.c
+++ b/drivers/macintosh/windfarm_pm121.c
@@ -1008,7 +1008,7 @@ static int __init pm121_init(void)
1008{ 1008{
1009 int rc = -ENODEV; 1009 int rc = -ENODEV;
1010 1010
1011 if (machine_is_compatible("PowerMac12,1")) 1011 if (of_machine_is_compatible("PowerMac12,1"))
1012 rc = pm121_init_pm(); 1012 rc = pm121_init_pm();
1013 1013
1014 if (rc == 0) { 1014 if (rc == 0) {
diff --git a/drivers/macintosh/windfarm_pm81.c b/drivers/macintosh/windfarm_pm81.c
index abbe206474f5..565d5b2adc95 100644
--- a/drivers/macintosh/windfarm_pm81.c
+++ b/drivers/macintosh/windfarm_pm81.c
@@ -779,8 +779,8 @@ static int __init wf_smu_init(void)
779{ 779{
780 int rc = -ENODEV; 780 int rc = -ENODEV;
781 781
782 if (machine_is_compatible("PowerMac8,1") || 782 if (of_machine_is_compatible("PowerMac8,1") ||
783 machine_is_compatible("PowerMac8,2")) 783 of_machine_is_compatible("PowerMac8,2"))
784 rc = wf_init_pm(); 784 rc = wf_init_pm();
785 785
786 if (rc == 0) { 786 if (rc == 0) {
diff --git a/drivers/macintosh/windfarm_pm91.c b/drivers/macintosh/windfarm_pm91.c
index 764c525b2117..bea99168ff35 100644
--- a/drivers/macintosh/windfarm_pm91.c
+++ b/drivers/macintosh/windfarm_pm91.c
@@ -711,7 +711,7 @@ static int __init wf_smu_init(void)
711{ 711{
712 int rc = -ENODEV; 712 int rc = -ENODEV;
713 713
714 if (machine_is_compatible("PowerMac9,1")) 714 if (of_machine_is_compatible("PowerMac9,1"))
715 rc = wf_init_pm(); 715 rc = wf_init_pm();
716 716
717 if (rc == 0) { 717 if (rc == 0) {
diff --git a/drivers/macintosh/windfarm_smu_sensors.c b/drivers/macintosh/windfarm_smu_sensors.c
index 9c567b93f417..3c193504bb80 100644
--- a/drivers/macintosh/windfarm_smu_sensors.c
+++ b/drivers/macintosh/windfarm_smu_sensors.c
@@ -363,9 +363,9 @@ smu_cpu_power_create(struct wf_sensor *volts, struct wf_sensor *amps)
363 * I yet have to figure out what's up with 8,2 and will have to 363 * I yet have to figure out what's up with 8,2 and will have to
364 * adjust for later, unless we can 100% trust the SDB partition... 364 * adjust for later, unless we can 100% trust the SDB partition...
365 */ 365 */
366 if ((machine_is_compatible("PowerMac8,1") || 366 if ((of_machine_is_compatible("PowerMac8,1") ||
367 machine_is_compatible("PowerMac8,2") || 367 of_machine_is_compatible("PowerMac8,2") ||
368 machine_is_compatible("PowerMac9,1")) && 368 of_machine_is_compatible("PowerMac9,1")) &&
369 cpuvcp_version >= 2) { 369 cpuvcp_version >= 2) {
370 pow->quadratic = 1; 370 pow->quadratic = 1;
371 DBG("windfarm: CPU Power using quadratic transform\n"); 371 DBG("windfarm: CPU Power using quadratic transform\n");
diff --git a/drivers/net/mace.c b/drivers/net/mace.c
index d9fbad386389..43aea91e3369 100644
--- a/drivers/net/mace.c
+++ b/drivers/net/mace.c
@@ -206,7 +206,7 @@ static int __devinit mace_probe(struct macio_dev *mdev, const struct of_device_i
206 mp->port_aaui = port_aaui; 206 mp->port_aaui = port_aaui;
207 else { 207 else {
208 /* Apple Network Server uses the AAUI port */ 208 /* Apple Network Server uses the AAUI port */
209 if (machine_is_compatible("AAPL,ShinerESB")) 209 if (of_machine_is_compatible("AAPL,ShinerESB"))
210 mp->port_aaui = 1; 210 mp->port_aaui = 1;
211 else { 211 else {
212#ifdef CONFIG_MACE_AAUI_PORT 212#ifdef CONFIG_MACE_AAUI_PORT
diff --git a/drivers/of/base.c b/drivers/of/base.c
index 785e9cc1b207..6bc8740c21ad 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -219,13 +219,13 @@ int of_device_is_compatible(const struct device_node *device,
219EXPORT_SYMBOL(of_device_is_compatible); 219EXPORT_SYMBOL(of_device_is_compatible);
220 220
221/** 221/**
222 * machine_is_compatible - Test root of device tree for a given compatible value 222 * of_machine_is_compatible - Test root of device tree for a given compatible value
223 * @compat: compatible string to look for in root node's compatible property. 223 * @compat: compatible string to look for in root node's compatible property.
224 * 224 *
225 * Returns true if the root node has the given value in its 225 * Returns true if the root node has the given value in its
226 * compatible property. 226 * compatible property.
227 */ 227 */
228int machine_is_compatible(const char *compat) 228int of_machine_is_compatible(const char *compat)
229{ 229{
230 struct device_node *root; 230 struct device_node *root;
231 int rc = 0; 231 int rc = 0;
@@ -237,7 +237,7 @@ int machine_is_compatible(const char *compat)
237 } 237 }
238 return rc; 238 return rc;
239} 239}
240EXPORT_SYMBOL(machine_is_compatible); 240EXPORT_SYMBOL(of_machine_is_compatible);
241 241
242/** 242/**
243 * of_device_is_available - check if a device is available for use 243 * of_device_is_available - check if a device is available for use
diff --git a/drivers/serial/pmac_zilog.c b/drivers/serial/pmac_zilog.c
index 683e66f18e8c..3e2ae4807ae2 100644
--- a/drivers/serial/pmac_zilog.c
+++ b/drivers/serial/pmac_zilog.c
@@ -2031,9 +2031,9 @@ static int __init pmz_console_setup(struct console *co, char *options)
2031 /* 2031 /*
2032 * XServe's default to 57600 bps 2032 * XServe's default to 57600 bps
2033 */ 2033 */
2034 if (machine_is_compatible("RackMac1,1") 2034 if (of_machine_is_compatible("RackMac1,1")
2035 || machine_is_compatible("RackMac1,2") 2035 || of_machine_is_compatible("RackMac1,2")
2036 || machine_is_compatible("MacRISC4")) 2036 || of_machine_is_compatible("MacRISC4"))
2037 baud = 57600; 2037 baud = 57600;
2038 2038
2039 /* 2039 /*
diff --git a/drivers/video/aty/aty128fb.c b/drivers/video/aty/aty128fb.c
index e4e4d433b007..9ee67d6da710 100644
--- a/drivers/video/aty/aty128fb.c
+++ b/drivers/video/aty/aty128fb.c
@@ -1931,22 +1931,22 @@ static int __devinit aty128_init(struct pci_dev *pdev, const struct pci_device_i
1931 * PowerMac2,2 summer 2000 iMacs 1931 * PowerMac2,2 summer 2000 iMacs
1932 * PowerMac4,1 january 2001 iMacs "flower power" 1932 * PowerMac4,1 january 2001 iMacs "flower power"
1933 */ 1933 */
1934 if (machine_is_compatible("PowerMac2,1") || 1934 if (of_machine_is_compatible("PowerMac2,1") ||
1935 machine_is_compatible("PowerMac2,2") || 1935 of_machine_is_compatible("PowerMac2,2") ||
1936 machine_is_compatible("PowerMac4,1")) 1936 of_machine_is_compatible("PowerMac4,1"))
1937 default_vmode = VMODE_1024_768_75; 1937 default_vmode = VMODE_1024_768_75;
1938 1938
1939 /* iBook SE */ 1939 /* iBook SE */
1940 if (machine_is_compatible("PowerBook2,2")) 1940 if (of_machine_is_compatible("PowerBook2,2"))
1941 default_vmode = VMODE_800_600_60; 1941 default_vmode = VMODE_800_600_60;
1942 1942
1943 /* PowerBook Firewire (Pismo), iBook Dual USB */ 1943 /* PowerBook Firewire (Pismo), iBook Dual USB */
1944 if (machine_is_compatible("PowerBook3,1") || 1944 if (of_machine_is_compatible("PowerBook3,1") ||
1945 machine_is_compatible("PowerBook4,1")) 1945 of_machine_is_compatible("PowerBook4,1"))
1946 default_vmode = VMODE_1024_768_60; 1946 default_vmode = VMODE_1024_768_60;
1947 1947
1948 /* PowerBook Titanium */ 1948 /* PowerBook Titanium */
1949 if (machine_is_compatible("PowerBook3,2")) 1949 if (of_machine_is_compatible("PowerBook3,2"))
1950 default_vmode = VMODE_1152_768_60; 1950 default_vmode = VMODE_1152_768_60;
1951 1951
1952 if (default_cmode > 16) 1952 if (default_cmode > 16)
diff --git a/drivers/video/aty/atyfb_base.c b/drivers/video/aty/atyfb_base.c
index 5f1b5807a48f..e45ab8db2ddc 100644
--- a/drivers/video/aty/atyfb_base.c
+++ b/drivers/video/aty/atyfb_base.c
@@ -2439,7 +2439,7 @@ static int __devinit aty_init(struct fb_info *info)
2439 * The Apple iBook1 uses non-standard memory frequencies. 2439 * The Apple iBook1 uses non-standard memory frequencies.
2440 * We detect it and set the frequency manually. 2440 * We detect it and set the frequency manually.
2441 */ 2441 */
2442 if (machine_is_compatible("PowerBook2,1")) { 2442 if (of_machine_is_compatible("PowerBook2,1")) {
2443 par->pll_limits.mclk = 70; 2443 par->pll_limits.mclk = 70;
2444 par->pll_limits.xclk = 53; 2444 par->pll_limits.xclk = 53;
2445 } 2445 }
@@ -2659,7 +2659,7 @@ static int __devinit aty_init(struct fb_info *info)
2659 FBINFO_HWACCEL_YPAN; 2659 FBINFO_HWACCEL_YPAN;
2660 2660
2661#ifdef CONFIG_PMAC_BACKLIGHT 2661#ifdef CONFIG_PMAC_BACKLIGHT
2662 if (M64_HAS(G3_PB_1_1) && machine_is_compatible("PowerBook1,1")) { 2662 if (M64_HAS(G3_PB_1_1) && of_machine_is_compatible("PowerBook1,1")) {
2663 /* 2663 /*
2664 * these bits let the 101 powerbook 2664 * these bits let the 101 powerbook
2665 * wake up from sleep -- paulus 2665 * wake up from sleep -- paulus
@@ -2690,9 +2690,9 @@ static int __devinit aty_init(struct fb_info *info)
2690 if (M64_HAS(G3_PB_1024x768)) 2690 if (M64_HAS(G3_PB_1024x768))
2691 /* G3 PowerBook with 1024x768 LCD */ 2691 /* G3 PowerBook with 1024x768 LCD */
2692 default_vmode = VMODE_1024_768_60; 2692 default_vmode = VMODE_1024_768_60;
2693 else if (machine_is_compatible("iMac")) 2693 else if (of_machine_is_compatible("iMac"))
2694 default_vmode = VMODE_1024_768_75; 2694 default_vmode = VMODE_1024_768_75;
2695 else if (machine_is_compatible("PowerBook2,1")) 2695 else if (of_machine_is_compatible("PowerBook2,1"))
2696 /* iBook with 800x600 LCD */ 2696 /* iBook with 800x600 LCD */
2697 default_vmode = VMODE_800_600_60; 2697 default_vmode = VMODE_800_600_60;
2698 else 2698 else
diff --git a/drivers/video/aty/radeon_backlight.c b/drivers/video/aty/radeon_backlight.c
index 1a056adb61c8..fa1198c4ccc5 100644
--- a/drivers/video/aty/radeon_backlight.c
+++ b/drivers/video/aty/radeon_backlight.c
@@ -175,9 +175,9 @@ void radeonfb_bl_init(struct radeonfb_info *rinfo)
175 175
176#ifdef CONFIG_PMAC_BACKLIGHT 176#ifdef CONFIG_PMAC_BACKLIGHT
177 pdata->negative = pdata->negative || 177 pdata->negative = pdata->negative ||
178 machine_is_compatible("PowerBook4,3") || 178 of_machine_is_compatible("PowerBook4,3") ||
179 machine_is_compatible("PowerBook6,3") || 179 of_machine_is_compatible("PowerBook6,3") ||
180 machine_is_compatible("PowerBook6,5"); 180 of_machine_is_compatible("PowerBook6,5");
181#endif 181#endif
182 182
183 rinfo->info->bl_dev = bd; 183 rinfo->info->bl_dev = bd;
diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
index 8118d4559dd5..fbf29610616d 100644
--- a/include/linux/of_fdt.h
+++ b/include/linux/of_fdt.h
@@ -85,7 +85,7 @@ extern int early_init_dt_scan_root(unsigned long node, const char *uname,
85extern void finish_device_tree(void); 85extern void finish_device_tree(void);
86extern void unflatten_device_tree(void); 86extern void unflatten_device_tree(void);
87extern void early_init_devtree(void *); 87extern void early_init_devtree(void *);
88extern int machine_is_compatible(const char *compat); 88extern int of_machine_is_compatible(const char *compat);
89extern void print_properties(struct device_node *node); 89extern void print_properties(struct device_node *node);
90extern int prom_n_intr_cells(struct device_node* np); 90extern int prom_n_intr_cells(struct device_node* np);
91extern void prom_get_irq_senses(unsigned char *senses, int off, int max); 91extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
diff --git a/sound/ppc/awacs.c b/sound/ppc/awacs.c
index 2e156467b814..b36679384b27 100644
--- a/sound/ppc/awacs.c
+++ b/sound/ppc/awacs.c
@@ -751,8 +751,8 @@ static void snd_pmac_awacs_suspend(struct snd_pmac *chip)
751 751
752static void snd_pmac_awacs_resume(struct snd_pmac *chip) 752static void snd_pmac_awacs_resume(struct snd_pmac *chip)
753{ 753{
754 if (machine_is_compatible("PowerBook3,1") 754 if (of_machine_is_compatible("PowerBook3,1")
755 || machine_is_compatible("PowerBook3,2")) { 755 || of_machine_is_compatible("PowerBook3,2")) {
756 msleep(100); 756 msleep(100);
757 snd_pmac_awacs_write_reg(chip, 1, 757 snd_pmac_awacs_write_reg(chip, 1,
758 chip->awacs_reg[1] & ~MASK_PAROUT); 758 chip->awacs_reg[1] & ~MASK_PAROUT);
@@ -780,16 +780,16 @@ static void snd_pmac_awacs_resume(struct snd_pmac *chip)
780} 780}
781#endif /* CONFIG_PM */ 781#endif /* CONFIG_PM */
782 782
783#define IS_PM7500 (machine_is_compatible("AAPL,7500") \ 783#define IS_PM7500 (of_machine_is_compatible("AAPL,7500") \
784 || machine_is_compatible("AAPL,8500") \ 784 || of_machine_is_compatible("AAPL,8500") \
785 || machine_is_compatible("AAPL,9500")) 785 || of_machine_is_compatible("AAPL,9500"))
786#define IS_PM5500 (machine_is_compatible("AAPL,e411")) 786#define IS_PM5500 (of_machine_is_compatible("AAPL,e411"))
787#define IS_BEIGE (machine_is_compatible("AAPL,Gossamer")) 787#define IS_BEIGE (of_machine_is_compatible("AAPL,Gossamer"))
788#define IS_IMAC1 (machine_is_compatible("PowerMac2,1")) 788#define IS_IMAC1 (of_machine_is_compatible("PowerMac2,1"))
789#define IS_IMAC2 (machine_is_compatible("PowerMac2,2") \ 789#define IS_IMAC2 (of_machine_is_compatible("PowerMac2,2") \
790 || machine_is_compatible("PowerMac4,1")) 790 || of_machine_is_compatible("PowerMac4,1"))
791#define IS_G4AGP (machine_is_compatible("PowerMac3,1")) 791#define IS_G4AGP (of_machine_is_compatible("PowerMac3,1"))
792#define IS_LOMBARD (machine_is_compatible("PowerBook1,1")) 792#define IS_LOMBARD (of_machine_is_compatible("PowerBook1,1"))
793 793
794static int imac1, imac2; 794static int imac1, imac2;
795 795
diff --git a/sound/ppc/burgundy.c b/sound/ppc/burgundy.c
index 0accfe49735b..1f72e1c786bf 100644
--- a/sound/ppc/burgundy.c
+++ b/sound/ppc/burgundy.c
@@ -582,7 +582,7 @@ static int snd_pmac_burgundy_detect_headphone(struct snd_pmac *chip)
582static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_notify) 582static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_notify)
583{ 583{
584 if (chip->auto_mute) { 584 if (chip->auto_mute) {
585 int imac = machine_is_compatible("iMac"); 585 int imac = of_machine_is_compatible("iMac");
586 int reg, oreg; 586 int reg, oreg;
587 reg = oreg = snd_pmac_burgundy_rcb(chip, 587 reg = oreg = snd_pmac_burgundy_rcb(chip,
588 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES); 588 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES);
@@ -620,7 +620,7 @@ static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_noti
620 */ 620 */
621int __devinit snd_pmac_burgundy_init(struct snd_pmac *chip) 621int __devinit snd_pmac_burgundy_init(struct snd_pmac *chip)
622{ 622{
623 int imac = machine_is_compatible("iMac"); 623 int imac = of_machine_is_compatible("iMac");
624 int i, err; 624 int i, err;
625 625
626 /* Checks to see the chip is alive and kicking */ 626 /* Checks to see the chip is alive and kicking */
diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 7bc492ee77ec..85081172403f 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -922,11 +922,11 @@ static void __devinit detect_byte_swap(struct snd_pmac *chip)
922 } 922 }
923 923
924 /* it seems the Pismo & iBook can't byte-swap in hardware. */ 924 /* it seems the Pismo & iBook can't byte-swap in hardware. */
925 if (machine_is_compatible("PowerBook3,1") || 925 if (of_machine_is_compatible("PowerBook3,1") ||
926 machine_is_compatible("PowerBook2,1")) 926 of_machine_is_compatible("PowerBook2,1"))
927 chip->can_byte_swap = 0 ; 927 chip->can_byte_swap = 0 ;
928 928
929 if (machine_is_compatible("PowerBook2,1")) 929 if (of_machine_is_compatible("PowerBook2,1"))
930 chip->can_duplex = 0; 930 chip->can_duplex = 0;
931} 931}
932 932
@@ -959,11 +959,11 @@ static int __devinit snd_pmac_detect(struct snd_pmac *chip)
959 chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */ 959 chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */
960 960
961 /* check machine type */ 961 /* check machine type */
962 if (machine_is_compatible("AAPL,3400/2400") 962 if (of_machine_is_compatible("AAPL,3400/2400")
963 || machine_is_compatible("AAPL,3500")) 963 || of_machine_is_compatible("AAPL,3500"))
964 chip->is_pbook_3400 = 1; 964 chip->is_pbook_3400 = 1;
965 else if (machine_is_compatible("PowerBook1,1") 965 else if (of_machine_is_compatible("PowerBook1,1")
966 || machine_is_compatible("AAPL,PowerBook1998")) 966 || of_machine_is_compatible("AAPL,PowerBook1998"))
967 chip->is_pbook_G3 = 1; 967 chip->is_pbook_G3 = 1;
968 chip->node = of_find_node_by_name(NULL, "awacs"); 968 chip->node = of_find_node_by_name(NULL, "awacs");
969 sound = of_node_get(chip->node); 969 sound = of_node_get(chip->node);
@@ -1033,8 +1033,8 @@ static int __devinit snd_pmac_detect(struct snd_pmac *chip)
1033 } 1033 }
1034 if (of_device_is_compatible(sound, "tumbler")) { 1034 if (of_device_is_compatible(sound, "tumbler")) {
1035 chip->model = PMAC_TUMBLER; 1035 chip->model = PMAC_TUMBLER;
1036 chip->can_capture = machine_is_compatible("PowerMac4,2") 1036 chip->can_capture = of_machine_is_compatible("PowerMac4,2")
1037 || machine_is_compatible("PowerBook4,1"); 1037 || of_machine_is_compatible("PowerBook4,1");
1038 chip->can_duplex = 0; 1038 chip->can_duplex = 0;
1039 // chip->can_byte_swap = 0; /* FIXME: check this */ 1039 // chip->can_byte_swap = 0; /* FIXME: check this */
1040 chip->num_freqs = ARRAY_SIZE(tumbler_freqs); 1040 chip->num_freqs = ARRAY_SIZE(tumbler_freqs);
diff --git a/sound/soc/fsl/efika-audio-fabric.c b/sound/soc/fsl/efika-audio-fabric.c
index 3326e2a1e863..1a5b8e0d6a34 100644
--- a/sound/soc/fsl/efika-audio-fabric.c
+++ b/sound/soc/fsl/efika-audio-fabric.c
@@ -55,7 +55,7 @@ static __init int efika_fabric_init(void)
55 struct platform_device *pdev; 55 struct platform_device *pdev;
56 int rc; 56 int rc;
57 57
58 if (!machine_is_compatible("bplan,efika")) 58 if (!of_machine_is_compatible("bplan,efika"))
59 return -ENODEV; 59 return -ENODEV;
60 60
61 card.platform = &mpc5200_audio_dma_platform; 61 card.platform = &mpc5200_audio_dma_platform;
diff --git a/sound/soc/fsl/pcm030-audio-fabric.c b/sound/soc/fsl/pcm030-audio-fabric.c
index b928ef7d28eb..6644cba7cbf2 100644
--- a/sound/soc/fsl/pcm030-audio-fabric.c
+++ b/sound/soc/fsl/pcm030-audio-fabric.c
@@ -55,7 +55,7 @@ static __init int pcm030_fabric_init(void)
55 struct platform_device *pdev; 55 struct platform_device *pdev;
56 int rc; 56 int rc;
57 57
58 if (!machine_is_compatible("phytec,pcm030")) 58 if (!of_machine_is_compatible("phytec,pcm030"))
59 return -ENODEV; 59 return -ENODEV;
60 60
61 card.platform = &mpc5200_audio_dma_platform; 61 card.platform = &mpc5200_audio_dma_platform;