Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

of: add 'of_' prefix to machine_is_compatible()

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>

+142 -142
+1 -1
arch/powerpc/kernel/pci_64.c
··· 224 224 * G5 machines... So when something asks for bus 0 io base 225 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 228 struct device_node *agp; 229 229 230 230 agp = of_find_compatible_node(NULL, NULL, "u3-agp");
+2 -2
arch/powerpc/platforms/85xx/xes_mpc85xx.c
··· 80 80 printk(KERN_INFO "xes_mpc85xx: Enabling L2 as cache\n"); 81 81 82 82 ctl = MPC85xx_L2CTL_L2E | MPC85xx_L2CTL_L2I; 83 - if (machine_is_compatible("MPC8540") || 84 - machine_is_compatible("MPC8560")) 83 + if (of_machine_is_compatible("MPC8540") || 84 + of_machine_is_compatible("MPC8560")) 85 85 /* 86 86 * Assume L2 SRAM is used fully for cache, so set 87 87 * L2BLKSZ (bits 4:5) to match L2SIZ (bits 2:3).
+1 -1
arch/powerpc/platforms/cell/cbe_powerbutton.c
··· 48 48 int ret = 0; 49 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 52 printk(KERN_ERR "%s: Not a cell blade.\n", __func__); 53 53 ret = -ENODEV; 54 54 goto out;
+1 -1
arch/powerpc/platforms/cell/ras.c
··· 255 255 { 256 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 259 if (!sysreset_hack) 260 260 return 0; 261 261
+2 -2
arch/powerpc/platforms/pasemi/cpufreq.c
··· 304 304 305 305 static int __init pas_cpufreq_init(void) 306 306 { 307 - if (!machine_is_compatible("PA6T-1682M") && 308 - !machine_is_compatible("pasemi,pwrficient")) 307 + if (!of_machine_is_compatible("PA6T-1682M") && 308 + !of_machine_is_compatible("pasemi,pwrficient")) 309 309 return -ENODEV; 310 310 311 311 return cpufreq_register_driver(&pas_cpufreq_driver);
+7 -7
arch/powerpc/platforms/powermac/cpufreq_32.c
··· 657 657 cur_freq = (*value) / 1000; 658 658 659 659 /* Check for 7447A based MacRISC3 */ 660 - if (machine_is_compatible("MacRISC3") && 660 + if (of_machine_is_compatible("MacRISC3") && 661 661 of_get_property(cpunode, "dynamic-power-step", NULL) && 662 662 PVR_VER(mfspr(SPRN_PVR)) == 0x8003) { 663 663 pmac_cpufreq_init_7447A(cpunode); 664 664 /* Check for other MacRISC3 machines */ 665 - } else if (machine_is_compatible("PowerBook3,4") || 666 - machine_is_compatible("PowerBook3,5") || 667 - machine_is_compatible("MacRISC3")) { 665 + } else if (of_machine_is_compatible("PowerBook3,4") || 666 + of_machine_is_compatible("PowerBook3,5") || 667 + of_machine_is_compatible("MacRISC3")) { 668 668 pmac_cpufreq_init_MacRISC3(cpunode); 669 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 671 hi_freq = cur_freq; 672 672 low_freq = 400000; 673 673 set_speed_proc = pmu_set_cpu_speed; 674 674 is_pmu_based = 1; 675 675 } 676 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 678 hi_freq = cur_freq; 679 679 low_freq = 500000; 680 680 set_speed_proc = pmu_set_cpu_speed; 681 681 is_pmu_based = 1; 682 682 } 683 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 685 /* We only know about the 400 MHz and the 500Mhz model 686 686 * they both have 300 MHz as low frequency 687 687 */
+7 -7
arch/powerpc/platforms/powermac/cpufreq_64.c
··· 398 398 int rc = -ENODEV; 399 399 400 400 /* Check supported platforms */ 401 - if (machine_is_compatible("PowerMac8,1") || 402 - machine_is_compatible("PowerMac8,2") || 403 - machine_is_compatible("PowerMac9,1")) 401 + if (of_machine_is_compatible("PowerMac8,1") || 402 + of_machine_is_compatible("PowerMac8,2") || 403 + of_machine_is_compatible("PowerMac9,1")) 404 404 use_volts_smu = 1; 405 - else if (machine_is_compatible("PowerMac11,2")) 405 + else if (of_machine_is_compatible("PowerMac11,2")) 406 406 use_volts_vdnap = 1; 407 407 else 408 408 return -ENODEV; ··· 729 729 return -ENODEV; 730 730 } 731 731 732 - if (machine_is_compatible("PowerMac7,2") || 733 - machine_is_compatible("PowerMac7,3") || 734 - machine_is_compatible("RackMac3,1")) 732 + if (of_machine_is_compatible("PowerMac7,2") || 733 + of_machine_is_compatible("PowerMac7,3") || 734 + of_machine_is_compatible("RackMac3,1")) 735 735 rc = g5_pm72_cpufreq_init(cpus); 736 736 #ifdef CONFIG_PMAC_SMU 737 737 else
+1 -1
arch/powerpc/platforms/powermac/feature.c
··· 2426 2426 } 2427 2427 } 2428 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 2430 pmac_mb = pmac_mb_defs[i]; 2431 2431 goto found; 2432 2432 }
+6 -6
arch/powerpc/platforms/powermac/smp.c
··· 693 693 #ifdef CONFIG_PPC64 694 694 695 695 /* i2c based HW sync on some G5s */ 696 - if (machine_is_compatible("PowerMac7,2") || 697 - machine_is_compatible("PowerMac7,3") || 698 - machine_is_compatible("RackMac3,1")) 696 + if (of_machine_is_compatible("PowerMac7,2") || 697 + of_machine_is_compatible("PowerMac7,3") || 698 + of_machine_is_compatible("RackMac3,1")) 699 699 smp_core99_setup_i2c_hwsync(ncpus); 700 700 701 701 /* pfunc based HW sync on recent G5s */ ··· 713 713 #else /* CONFIG_PPC64 */ 714 714 715 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 717 struct device_node *cpu; 718 718 const u32 *tbprop = NULL; 719 719 ··· 750 750 #endif 751 751 752 752 /* 32 bits SMP can't NAP */ 753 - if (!machine_is_compatible("MacRISC4")) 753 + if (!of_machine_is_compatible("MacRISC4")) 754 754 powersave_nap = 0; 755 755 } 756 756 ··· 852 852 /* If we didn't start the second CPU, we must take 853 853 * it off the bus 854 854 */ 855 - if (machine_is_compatible("MacRISC4") && 855 + if (of_machine_is_compatible("MacRISC4") && 856 856 num_online_cpus() < 2) 857 857 g5_phy_disable_cpu1(); 858 858 #endif /* CONFIG_PPC64 */
+4 -4
arch/powerpc/platforms/powermac/time.c
··· 317 317 * calibration. That's better since the VIA itself seems 318 318 * to be slightly off. --BenH 319 319 */ 320 - if (!machine_is_compatible("MacRISC2") && 321 - !machine_is_compatible("MacRISC3") && 322 - !machine_is_compatible("MacRISC4")) 320 + if (!of_machine_is_compatible("MacRISC2") && 321 + !of_machine_is_compatible("MacRISC3") && 322 + !of_machine_is_compatible("MacRISC4")) 323 323 if (via_calibrate_decr()) 324 324 return; 325 325 ··· 328 328 * probably implement calibration based on the KL timer on these 329 329 * machines anyway... -BenH 330 330 */ 331 - if (machine_is_compatible("PowerMac3,5")) 331 + if (of_machine_is_compatible("PowerMac3,5")) 332 332 if (via_calibrate_decr()) 333 333 return; 334 334 #endif
+3 -3
arch/powerpc/platforms/powermac/udbg_scc.c
··· 132 132 scc_inittab[1] = in_8(sccc); 133 133 out_8(sccc, 12); 134 134 scc_inittab[3] = in_8(sccc); 135 - } else if (machine_is_compatible("RackMac1,1") 136 - || machine_is_compatible("RackMac1,2") 137 - || machine_is_compatible("MacRISC4")) { 135 + } else if (of_machine_is_compatible("RackMac1,1") 136 + || of_machine_is_compatible("RackMac1,2") 137 + || of_machine_is_compatible("MacRISC4")) { 138 138 /* Xserves and G5s default to 57600 */ 139 139 scc_inittab[1] = 0; 140 140 scc_inittab[3] = 0;
+2 -2
arch/powerpc/sysdev/grackle.c
··· 56 56 void __init setup_grackle(struct pci_controller *hose) 57 57 { 58 58 setup_indirect_pci(hose, 0xfec00000, 0xfee00000, 0); 59 - if (machine_is_compatible("PowerMac1,1")) 59 + if (of_machine_is_compatible("PowerMac1,1")) 60 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 62 grackle_set_loop_snoop(hose, 1); 63 63 #if 0 /* Disabled for now, HW problems ??? */ 64 64 grackle_set_stg(hose, 1);
+1 -1
drivers/char/hvc_beat.c
··· 99 99 100 100 static 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 103 hvc_instantiate(0, 0, &hvc_beat_get_put_ops); 104 104 } 105 105 return 0;
+22 -22
drivers/gpu/drm/radeon/radeon_combios.c
··· 1280 1280 rdev->mode_info.connector_table = radeon_connector_table; 1281 1281 if (rdev->mode_info.connector_table == CT_NONE) { 1282 1282 #ifdef CONFIG_PPC_PMAC 1283 - if (machine_is_compatible("PowerBook3,3")) { 1283 + if (of_machine_is_compatible("PowerBook3,3")) { 1284 1284 /* powerbook with VGA */ 1285 1285 rdev->mode_info.connector_table = CT_POWERBOOK_VGA; 1286 - } else if (machine_is_compatible("PowerBook3,4") || 1287 - machine_is_compatible("PowerBook3,5")) { 1286 + } else if (of_machine_is_compatible("PowerBook3,4") || 1287 + of_machine_is_compatible("PowerBook3,5")) { 1288 1288 /* powerbook with internal tmds */ 1289 1289 rdev->mode_info.connector_table = CT_POWERBOOK_INTERNAL; 1290 - } else if (machine_is_compatible("PowerBook5,1") || 1291 - machine_is_compatible("PowerBook5,2") || 1292 - machine_is_compatible("PowerBook5,3") || 1293 - machine_is_compatible("PowerBook5,4") || 1294 - machine_is_compatible("PowerBook5,5")) { 1290 + } else if (of_machine_is_compatible("PowerBook5,1") || 1291 + of_machine_is_compatible("PowerBook5,2") || 1292 + of_machine_is_compatible("PowerBook5,3") || 1293 + of_machine_is_compatible("PowerBook5,4") || 1294 + of_machine_is_compatible("PowerBook5,5")) { 1295 1295 /* powerbook with external single link tmds (sil164) */ 1296 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 1298 /* powerbook with external dual or single link tmds */ 1299 1299 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; 1300 - } else if (machine_is_compatible("PowerBook5,7") || 1301 - machine_is_compatible("PowerBook5,8") || 1302 - machine_is_compatible("PowerBook5,9")) { 1300 + } else if (of_machine_is_compatible("PowerBook5,7") || 1301 + of_machine_is_compatible("PowerBook5,8") || 1302 + of_machine_is_compatible("PowerBook5,9")) { 1303 1303 /* PowerBook6,2 ? */ 1304 1304 /* powerbook with external dual link tmds (sil1178?) */ 1305 1305 rdev->mode_info.connector_table = CT_POWERBOOK_EXTERNAL; 1306 - } else if (machine_is_compatible("PowerBook4,1") || 1307 - machine_is_compatible("PowerBook4,2") || 1308 - machine_is_compatible("PowerBook4,3") || 1309 - machine_is_compatible("PowerBook6,3") || 1310 - machine_is_compatible("PowerBook6,5") || 1311 - machine_is_compatible("PowerBook6,7")) { 1306 + } else if (of_machine_is_compatible("PowerBook4,1") || 1307 + of_machine_is_compatible("PowerBook4,2") || 1308 + of_machine_is_compatible("PowerBook4,3") || 1309 + of_machine_is_compatible("PowerBook6,3") || 1310 + of_machine_is_compatible("PowerBook6,5") || 1311 + of_machine_is_compatible("PowerBook6,7")) { 1312 1312 /* ibook */ 1313 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 1315 /* emac */ 1316 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 1318 /* mini with internal tmds */ 1319 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 1321 /* mini with external tmds */ 1322 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 1324 /* PowerMac8,1 ? */ 1325 1325 /* imac g5 isight */ 1326 1326 rdev->mode_info.connector_table = CT_IMAC_G5_ISIGHT;
+2 -2
drivers/macintosh/adb.c
··· 322 322 adb_controller = NULL; 323 323 } else { 324 324 #ifdef CONFIG_PPC 325 - if (machine_is_compatible("AAPL,PowerBook1998") || 326 - machine_is_compatible("PowerBook1,1")) 325 + if (of_machine_is_compatible("AAPL,PowerBook1998") || 326 + of_machine_is_compatible("PowerBook1,1")) 327 327 sleepy_trackpad = 1; 328 328 #endif /* CONFIG_PPC */ 329 329
+4 -4
drivers/macintosh/therm_pm72.c
··· 1899 1899 */ 1900 1900 if (rackmac) 1901 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 1903 && (cpu_count > 1) 1904 1904 && fcu_fans[CPUA_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID 1905 1905 && fcu_fans[CPUB_PUMP_RPM_INDEX].id != FCU_FAN_ABSENT_ID) { ··· 2234 2234 { 2235 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") && 2240 - !machine_is_compatible("PowerMac7,3") && 2239 + if (!of_machine_is_compatible("PowerMac7,2") && 2240 + !of_machine_is_compatible("PowerMac7,3") && 2241 2241 !rackmac) 2242 2242 return -ENODEV; 2243 2243
+1 -1
drivers/macintosh/therm_windtunnel.c
··· 490 490 info = of_get_property(np, "thermal-info", NULL); 491 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 494 return -ENODEV; 495 495 496 496 if( info->id != 3 ) {
+4 -4
drivers/macintosh/via-pmu-backlight.c
··· 150 150 151 151 /* Special case for the old PowerBook since I can't test on it */ 152 152 autosave = 153 - machine_is_compatible("AAPL,3400/2400") || 154 - machine_is_compatible("AAPL,3500"); 153 + of_machine_is_compatible("AAPL,3400/2400") || 154 + of_machine_is_compatible("AAPL,3500"); 155 155 156 156 if (!autosave && 157 157 !pmac_has_backlight_type("pmu") && 158 - !machine_is_compatible("AAPL,PowerBook1998") && 159 - !machine_is_compatible("PowerBook1,1")) 158 + !of_machine_is_compatible("AAPL,PowerBook1998") && 159 + !of_machine_is_compatible("PowerBook1,1")) 160 160 return; 161 161 162 162 snprintf(name, sizeof(name), "pmubl");
+4 -4
drivers/macintosh/via-pmu.c
··· 463 463 #endif 464 464 465 465 #ifdef CONFIG_PPC32 466 - if (machine_is_compatible("AAPL,3400/2400") || 467 - machine_is_compatible("AAPL,3500")) { 466 + if (of_machine_is_compatible("AAPL,3400/2400") || 467 + of_machine_is_compatible("AAPL,3500")) { 468 468 int mb = pmac_call_feature(PMAC_FTR_GET_MB_INFO, 469 469 NULL, PMAC_MB_INFO_MODEL, 0); 470 470 pmu_battery_count = 1; ··· 472 472 pmu_batteries[0].flags |= PMU_BATT_TYPE_COMET; 473 473 else 474 474 pmu_batteries[0].flags |= PMU_BATT_TYPE_HOOPER; 475 - } else if (machine_is_compatible("AAPL,PowerBook1998") || 476 - machine_is_compatible("PowerBook1,1")) { 475 + } else if (of_machine_is_compatible("AAPL,PowerBook1998") || 476 + of_machine_is_compatible("PowerBook1,1")) { 477 477 pmu_battery_count = 2; 478 478 pmu_batteries[0].flags |= PMU_BATT_TYPE_SMART; 479 479 pmu_batteries[1].flags |= PMU_BATT_TYPE_SMART;
+3 -3
drivers/macintosh/windfarm_core.c
··· 468 468 DBG("wf: core loaded\n"); 469 469 470 470 /* Don't register on old machines that use therm_pm72 for now */ 471 - if (machine_is_compatible("PowerMac7,2") || 472 - machine_is_compatible("PowerMac7,3") || 473 - machine_is_compatible("RackMac3,1")) 471 + if (of_machine_is_compatible("PowerMac7,2") || 472 + of_machine_is_compatible("PowerMac7,3") || 473 + of_machine_is_compatible("RackMac3,1")) 474 474 return -ENODEV; 475 475 platform_device_register(&wf_platform_device); 476 476 return 0;
+3 -3
drivers/macintosh/windfarm_cpufreq_clamp.c
··· 76 76 struct wf_control *clamp; 77 77 78 78 /* Don't register on old machines that use therm_pm72 for now */ 79 - if (machine_is_compatible("PowerMac7,2") || 80 - machine_is_compatible("PowerMac7,3") || 81 - machine_is_compatible("RackMac3,1")) 79 + if (of_machine_is_compatible("PowerMac7,2") || 80 + of_machine_is_compatible("PowerMac7,3") || 81 + of_machine_is_compatible("RackMac3,1")) 82 82 return -ENODEV; 83 83 84 84 clamp = kmalloc(sizeof(struct wf_control), GFP_KERNEL);
+3 -3
drivers/macintosh/windfarm_lm75_sensor.c
··· 239 239 static int __init wf_lm75_sensor_init(void) 240 240 { 241 241 /* Don't register on old machines that use therm_pm72 for now */ 242 - if (machine_is_compatible("PowerMac7,2") || 243 - machine_is_compatible("PowerMac7,3") || 244 - machine_is_compatible("RackMac3,1")) 242 + if (of_machine_is_compatible("PowerMac7,2") || 243 + of_machine_is_compatible("PowerMac7,3") || 244 + of_machine_is_compatible("RackMac3,1")) 245 245 return -ENODEV; 246 246 return i2c_add_driver(&wf_lm75_driver); 247 247 }
+3 -3
drivers/macintosh/windfarm_max6690_sensor.c
··· 188 188 static int __init wf_max6690_sensor_init(void) 189 189 { 190 190 /* Don't register on old machines that use therm_pm72 for now */ 191 - if (machine_is_compatible("PowerMac7,2") || 192 - machine_is_compatible("PowerMac7,3") || 193 - machine_is_compatible("RackMac3,1")) 191 + if (of_machine_is_compatible("PowerMac7,2") || 192 + of_machine_is_compatible("PowerMac7,3") || 193 + of_machine_is_compatible("RackMac3,1")) 194 194 return -ENODEV; 195 195 return i2c_add_driver(&wf_max6690_driver); 196 196 }
+1 -1
drivers/macintosh/windfarm_pm112.c
··· 676 676 { 677 677 struct device_node *cpu; 678 678 679 - if (!machine_is_compatible("PowerMac11,2")) 679 + if (!of_machine_is_compatible("PowerMac11,2")) 680 680 return -ENODEV; 681 681 682 682 /* Count the number of CPU cores */
+1 -1
drivers/macintosh/windfarm_pm121.c
··· 1008 1008 { 1009 1009 int rc = -ENODEV; 1010 1010 1011 - if (machine_is_compatible("PowerMac12,1")) 1011 + if (of_machine_is_compatible("PowerMac12,1")) 1012 1012 rc = pm121_init_pm(); 1013 1013 1014 1014 if (rc == 0) {
+2 -2
drivers/macintosh/windfarm_pm81.c
··· 779 779 { 780 780 int rc = -ENODEV; 781 781 782 - if (machine_is_compatible("PowerMac8,1") || 783 - machine_is_compatible("PowerMac8,2")) 782 + if (of_machine_is_compatible("PowerMac8,1") || 783 + of_machine_is_compatible("PowerMac8,2")) 784 784 rc = wf_init_pm(); 785 785 786 786 if (rc == 0) {
+1 -1
drivers/macintosh/windfarm_pm91.c
··· 711 711 { 712 712 int rc = -ENODEV; 713 713 714 - if (machine_is_compatible("PowerMac9,1")) 714 + if (of_machine_is_compatible("PowerMac9,1")) 715 715 rc = wf_init_pm(); 716 716 717 717 if (rc == 0) {
+3 -3
drivers/macintosh/windfarm_smu_sensors.c
··· 363 363 * I yet have to figure out what's up with 8,2 and will have to 364 364 * adjust for later, unless we can 100% trust the SDB partition... 365 365 */ 366 - if ((machine_is_compatible("PowerMac8,1") || 367 - machine_is_compatible("PowerMac8,2") || 368 - machine_is_compatible("PowerMac9,1")) && 366 + if ((of_machine_is_compatible("PowerMac8,1") || 367 + of_machine_is_compatible("PowerMac8,2") || 368 + of_machine_is_compatible("PowerMac9,1")) && 369 369 cpuvcp_version >= 2) { 370 370 pow->quadratic = 1; 371 371 DBG("windfarm: CPU Power using quadratic transform\n");
+1 -1
drivers/net/mace.c
··· 206 206 mp->port_aaui = port_aaui; 207 207 else { 208 208 /* Apple Network Server uses the AAUI port */ 209 - if (machine_is_compatible("AAPL,ShinerESB")) 209 + if (of_machine_is_compatible("AAPL,ShinerESB")) 210 210 mp->port_aaui = 1; 211 211 else { 212 212 #ifdef CONFIG_MACE_AAUI_PORT
+3 -3
drivers/of/base.c
··· 219 219 EXPORT_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 223 * @compat: compatible string to look for in root node's compatible property. 224 224 * 225 225 * Returns true if the root node has the given value in its 226 226 * compatible property. 227 227 */ 228 - int machine_is_compatible(const char *compat) 228 + int of_machine_is_compatible(const char *compat) 229 229 { 230 230 struct device_node *root; 231 231 int rc = 0; ··· 237 237 } 238 238 return rc; 239 239 } 240 - EXPORT_SYMBOL(machine_is_compatible); 240 + EXPORT_SYMBOL(of_machine_is_compatible); 241 241 242 242 /** 243 243 * of_device_is_available - check if a device is available for use
+3 -3
drivers/serial/pmac_zilog.c
··· 2031 2031 /* 2032 2032 * XServe's default to 57600 bps 2033 2033 */ 2034 - if (machine_is_compatible("RackMac1,1") 2035 - || machine_is_compatible("RackMac1,2") 2036 - || machine_is_compatible("MacRISC4")) 2034 + if (of_machine_is_compatible("RackMac1,1") 2035 + || of_machine_is_compatible("RackMac1,2") 2036 + || of_machine_is_compatible("MacRISC4")) 2037 2037 baud = 57600; 2038 2038 2039 2039 /*
+7 -7
drivers/video/aty/aty128fb.c
··· 1931 1931 * PowerMac2,2 summer 2000 iMacs 1932 1932 * PowerMac4,1 january 2001 iMacs "flower power" 1933 1933 */ 1934 - if (machine_is_compatible("PowerMac2,1") || 1935 - machine_is_compatible("PowerMac2,2") || 1936 - machine_is_compatible("PowerMac4,1")) 1934 + if (of_machine_is_compatible("PowerMac2,1") || 1935 + of_machine_is_compatible("PowerMac2,2") || 1936 + of_machine_is_compatible("PowerMac4,1")) 1937 1937 default_vmode = VMODE_1024_768_75; 1938 1938 1939 1939 /* iBook SE */ 1940 - if (machine_is_compatible("PowerBook2,2")) 1940 + if (of_machine_is_compatible("PowerBook2,2")) 1941 1941 default_vmode = VMODE_800_600_60; 1942 1942 1943 1943 /* PowerBook Firewire (Pismo), iBook Dual USB */ 1944 - if (machine_is_compatible("PowerBook3,1") || 1945 - machine_is_compatible("PowerBook4,1")) 1944 + if (of_machine_is_compatible("PowerBook3,1") || 1945 + of_machine_is_compatible("PowerBook4,1")) 1946 1946 default_vmode = VMODE_1024_768_60; 1947 1947 1948 1948 /* PowerBook Titanium */ 1949 - if (machine_is_compatible("PowerBook3,2")) 1949 + if (of_machine_is_compatible("PowerBook3,2")) 1950 1950 default_vmode = VMODE_1152_768_60; 1951 1951 1952 1952 if (default_cmode > 16)
+4 -4
drivers/video/aty/atyfb_base.c
··· 2439 2439 * The Apple iBook1 uses non-standard memory frequencies. 2440 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 2443 par->pll_limits.mclk = 70; 2444 2444 par->pll_limits.xclk = 53; 2445 2445 } ··· 2659 2659 FBINFO_HWACCEL_YPAN; 2660 2660 2661 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 2664 * these bits let the 101 powerbook 2665 2665 * wake up from sleep -- paulus ··· 2690 2690 if (M64_HAS(G3_PB_1024x768)) 2691 2691 /* G3 PowerBook with 1024x768 LCD */ 2692 2692 default_vmode = VMODE_1024_768_60; 2693 - else if (machine_is_compatible("iMac")) 2693 + else if (of_machine_is_compatible("iMac")) 2694 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 2696 /* iBook with 800x600 LCD */ 2697 2697 default_vmode = VMODE_800_600_60; 2698 2698 else
+3 -3
drivers/video/aty/radeon_backlight.c
··· 175 175 176 176 #ifdef CONFIG_PMAC_BACKLIGHT 177 177 pdata->negative = pdata->negative || 178 - machine_is_compatible("PowerBook4,3") || 179 - machine_is_compatible("PowerBook6,3") || 180 - machine_is_compatible("PowerBook6,5"); 178 + of_machine_is_compatible("PowerBook4,3") || 179 + of_machine_is_compatible("PowerBook6,3") || 180 + of_machine_is_compatible("PowerBook6,5"); 181 181 #endif 182 182 183 183 rinfo->info->bl_dev = bd;
+1 -1
include/linux/of_fdt.h
··· 85 85 extern void finish_device_tree(void); 86 86 extern void unflatten_device_tree(void); 87 87 extern void early_init_devtree(void *); 88 - extern int machine_is_compatible(const char *compat); 88 + extern int of_machine_is_compatible(const char *compat); 89 89 extern void print_properties(struct device_node *node); 90 90 extern int prom_n_intr_cells(struct device_node* np); 91 91 extern void prom_get_irq_senses(unsigned char *senses, int off, int max);
+12 -12
sound/ppc/awacs.c
··· 751 751 752 752 static void snd_pmac_awacs_resume(struct snd_pmac *chip) 753 753 { 754 - if (machine_is_compatible("PowerBook3,1") 755 - || machine_is_compatible("PowerBook3,2")) { 754 + if (of_machine_is_compatible("PowerBook3,1") 755 + || of_machine_is_compatible("PowerBook3,2")) { 756 756 msleep(100); 757 757 snd_pmac_awacs_write_reg(chip, 1, 758 758 chip->awacs_reg[1] & ~MASK_PAROUT); ··· 780 780 } 781 781 #endif /* CONFIG_PM */ 782 782 783 - #define IS_PM7500 (machine_is_compatible("AAPL,7500") \ 784 - || machine_is_compatible("AAPL,8500") \ 785 - || machine_is_compatible("AAPL,9500")) 786 - #define IS_PM5500 (machine_is_compatible("AAPL,e411")) 787 - #define IS_BEIGE (machine_is_compatible("AAPL,Gossamer")) 788 - #define IS_IMAC1 (machine_is_compatible("PowerMac2,1")) 789 - #define IS_IMAC2 (machine_is_compatible("PowerMac2,2") \ 790 - || machine_is_compatible("PowerMac4,1")) 791 - #define IS_G4AGP (machine_is_compatible("PowerMac3,1")) 792 - #define IS_LOMBARD (machine_is_compatible("PowerBook1,1")) 783 + #define IS_PM7500 (of_machine_is_compatible("AAPL,7500") \ 784 + || of_machine_is_compatible("AAPL,8500") \ 785 + || of_machine_is_compatible("AAPL,9500")) 786 + #define IS_PM5500 (of_machine_is_compatible("AAPL,e411")) 787 + #define IS_BEIGE (of_machine_is_compatible("AAPL,Gossamer")) 788 + #define IS_IMAC1 (of_machine_is_compatible("PowerMac2,1")) 789 + #define IS_IMAC2 (of_machine_is_compatible("PowerMac2,2") \ 790 + || of_machine_is_compatible("PowerMac4,1")) 791 + #define IS_G4AGP (of_machine_is_compatible("PowerMac3,1")) 792 + #define IS_LOMBARD (of_machine_is_compatible("PowerBook1,1")) 793 793 794 794 static int imac1, imac2; 795 795
+2 -2
sound/ppc/burgundy.c
··· 582 582 static void snd_pmac_burgundy_update_automute(struct snd_pmac *chip, int do_notify) 583 583 { 584 584 if (chip->auto_mute) { 585 - int imac = machine_is_compatible("iMac"); 585 + int imac = of_machine_is_compatible("iMac"); 586 586 int reg, oreg; 587 587 reg = oreg = snd_pmac_burgundy_rcb(chip, 588 588 MASK_ADDR_BURGUNDY_MORE_OUTPUTENABLES); ··· 620 620 */ 621 621 int __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 624 int i, err; 625 625 626 626 /* Checks to see the chip is alive and kicking */
+9 -9
sound/ppc/pmac.c
··· 922 922 } 923 923 924 924 /* it seems the Pismo & iBook can't byte-swap in hardware. */ 925 - if (machine_is_compatible("PowerBook3,1") || 926 - machine_is_compatible("PowerBook2,1")) 925 + if (of_machine_is_compatible("PowerBook3,1") || 926 + of_machine_is_compatible("PowerBook2,1")) 927 927 chip->can_byte_swap = 0 ; 928 928 929 - if (machine_is_compatible("PowerBook2,1")) 929 + if (of_machine_is_compatible("PowerBook2,1")) 930 930 chip->can_duplex = 0; 931 931 } 932 932 ··· 959 959 chip->control_mask = MASK_IEPC | MASK_IEE | 0x11; /* default */ 960 960 961 961 /* check machine type */ 962 - if (machine_is_compatible("AAPL,3400/2400") 963 - || machine_is_compatible("AAPL,3500")) 962 + if (of_machine_is_compatible("AAPL,3400/2400") 963 + || of_machine_is_compatible("AAPL,3500")) 964 964 chip->is_pbook_3400 = 1; 965 - else if (machine_is_compatible("PowerBook1,1") 966 - || machine_is_compatible("AAPL,PowerBook1998")) 965 + else if (of_machine_is_compatible("PowerBook1,1") 966 + || of_machine_is_compatible("AAPL,PowerBook1998")) 967 967 chip->is_pbook_G3 = 1; 968 968 chip->node = of_find_node_by_name(NULL, "awacs"); 969 969 sound = of_node_get(chip->node); ··· 1033 1033 } 1034 1034 if (of_device_is_compatible(sound, "tumbler")) { 1035 1035 chip->model = PMAC_TUMBLER; 1036 - chip->can_capture = machine_is_compatible("PowerMac4,2") 1037 - || machine_is_compatible("PowerBook4,1"); 1036 + chip->can_capture = of_machine_is_compatible("PowerMac4,2") 1037 + || of_machine_is_compatible("PowerBook4,1"); 1038 1038 chip->can_duplex = 0; 1039 1039 // chip->can_byte_swap = 0; /* FIXME: check this */ 1040 1040 chip->num_freqs = ARRAY_SIZE(tumbler_freqs);
+1 -1
sound/soc/fsl/efika-audio-fabric.c
··· 55 55 struct platform_device *pdev; 56 56 int rc; 57 57 58 - if (!machine_is_compatible("bplan,efika")) 58 + if (!of_machine_is_compatible("bplan,efika")) 59 59 return -ENODEV; 60 60 61 61 card.platform = &mpc5200_audio_dma_platform;
+1 -1
sound/soc/fsl/pcm030-audio-fabric.c
··· 55 55 struct platform_device *pdev; 56 56 int rc; 57 57 58 - if (!machine_is_compatible("phytec,pcm030")) 58 + if (!of_machine_is_compatible("phytec,pcm030")) 59 59 return -ENODEV; 60 60 61 61 card.platform = &mpc5200_audio_dma_platform;