Skip to content

Commit 71a157e

Browse files
committed
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>
1 parent 89751a7 commit 71a157e

40 files changed

Lines changed: 142 additions & 142 deletions

‎arch/powerpc/kernel/pci_64.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ long sys_pciconfig_iobase(long which, unsigned long in_bus,
224224
* G5 machines... So when something asks for bus 0 io base
225225
* (bus 0 is HT root), we return the AGP one instead.
226226
*/
227-
if (in_bus == 0 && machine_is_compatible("MacRISC4")) {
227+
if (in_bus == 0 && of_machine_is_compatible("MacRISC4")) {
228228
struct device_node *agp;
229229

230230
agp = of_find_compatible_node(NULL, NULL, "u3-agp");

‎arch/powerpc/platforms/85xx/xes_mpc85xx.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ static void xes_mpc85xx_configure_l2(void __iomem *l2_base)
8080
printk(KERN_INFO "xes_mpc85xx: Enabling L2 as cache\n");
8181

8282
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"))
8585
/*
8686
* Assume L2 SRAM is used fully for cache, so set
8787
* L2BLKSZ (bits 4:5) to match L2SIZ (bits 2:3).

‎arch/powerpc/platforms/cell/cbe_powerbutton.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ static int __init cbe_powerbutton_init(void)
4848
int ret = 0;
4949
struct input_dev *dev;
5050

51-
if (!machine_is_compatible("IBM,CBPLUS-1.0")) {
51+
if (!of_machine_is_compatible("IBM,CBPLUS-1.0")) {
5252
printk(KERN_ERR "%s: Not a cell blade.\n", __func__);
5353
ret = -ENODEV;
5454
goto out;

‎arch/powerpc/platforms/cell/ras.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static int __init cbe_sysreset_init(void)
255255
{
256256
struct cbe_pmd_regs __iomem *regs;
257257

258-
sysreset_hack = machine_is_compatible("IBM,CBPLUS-1.0");
258+
sysreset_hack = of_machine_is_compatible("IBM,CBPLUS-1.0");
259259
if (!sysreset_hack)
260260
return 0;
261261

‎arch/powerpc/platforms/pasemi/cpufreq.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,8 @@ static struct cpufreq_driver pas_cpufreq_driver = {
304304

305305
static int __init pas_cpufreq_init(void)
306306
{
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"))
309309
return -ENODEV;
310310

311311
return cpufreq_register_driver(&pas_cpufreq_driver);

‎arch/powerpc/platforms/powermac/cpufreq_32.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -657,31 +657,31 @@ static int __init pmac_cpufreq_setup(void)
657657
cur_freq = (*value) / 1000;
658658

659659
/* Check for 7447A based MacRISC3 */
660-
if (machine_is_compatible("MacRISC3") &&
660+
if (of_machine_is_compatible("MacRISC3") &&
661661
of_get_property(cpunode, "dynamic-power-step", NULL) &&
662662
PVR_VER(mfspr(SPRN_PVR)) == 0x8003) {
663663
pmac_cpufreq_init_7447A(cpunode);
664664
/* 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")) {
668668
pmac_cpufreq_init_MacRISC3(cpunode);
669669
/* Else check for iBook2 500/600 */
670-
} else if (machine_is_compatible("PowerBook4,1")) {
670+
} else if (of_machine_is_compatible("PowerBook4,1")) {
671671
hi_freq = cur_freq;
672672
low_freq = 400000;
673673
set_speed_proc = pmu_set_cpu_speed;
674674
is_pmu_based = 1;
675675
}
676676
/* 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) {
678678
hi_freq = cur_freq;
679679
low_freq = 500000;
680680
set_speed_proc = pmu_set_cpu_speed;
681681
is_pmu_based = 1;
682682
}
683683
/* Else check for TiPb 400 & 500 */
684-
else if (machine_is_compatible("PowerBook3,2")) {
684+
else if (of_machine_is_compatible("PowerBook3,2")) {
685685
/* We only know about the 400 MHz and the 500Mhz model
686686
* they both have 300 MHz as low frequency
687687
*/

‎arch/powerpc/platforms/powermac/cpufreq_64.c‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -398,11 +398,11 @@ static int __init g5_neo2_cpufreq_init(struct device_node *cpus)
398398
int rc = -ENODEV;
399399

400400
/* 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"))
404404
use_volts_smu = 1;
405-
else if (machine_is_compatible("PowerMac11,2"))
405+
else if (of_machine_is_compatible("PowerMac11,2"))
406406
use_volts_vdnap = 1;
407407
else
408408
return -ENODEV;
@@ -729,9 +729,9 @@ static int __init g5_cpufreq_init(void)
729729
return -ENODEV;
730730
}
731731

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"))
735735
rc = g5_pm72_cpufreq_init(cpus);
736736
#ifdef CONFIG_PMAC_SMU
737737
else

‎arch/powerpc/platforms/powermac/feature.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2426,7 +2426,7 @@ static int __init probe_motherboard(void)
24262426
}
24272427
}
24282428
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)) {
24302430
pmac_mb = pmac_mb_defs[i];
24312431
goto found;
24322432
}

‎arch/powerpc/platforms/powermac/smp.c‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -693,9 +693,9 @@ static void __init smp_core99_setup(int ncpus)
693693
#ifdef CONFIG_PPC64
694694

695695
/* 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"))
699699
smp_core99_setup_i2c_hwsync(ncpus);
700700

701701
/* pfunc based HW sync on recent G5s */
@@ -713,7 +713,7 @@ static void __init smp_core99_setup(int ncpus)
713713
#else /* CONFIG_PPC64 */
714714

715715
/* 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")) {
717717
struct device_node *cpu;
718718
const u32 *tbprop = NULL;
719719

@@ -750,7 +750,7 @@ static void __init smp_core99_setup(int ncpus)
750750
#endif
751751

752752
/* 32 bits SMP can't NAP */
753-
if (!machine_is_compatible("MacRISC4"))
753+
if (!of_machine_is_compatible("MacRISC4"))
754754
powersave_nap = 0;
755755
}
756756

@@ -852,7 +852,7 @@ static void __devinit smp_core99_setup_cpu(int cpu_nr)
852852
/* If we didn't start the second CPU, we must take
853853
* it off the bus
854854
*/
855-
if (machine_is_compatible("MacRISC4") &&
855+
if (of_machine_is_compatible("MacRISC4") &&
856856
num_online_cpus() < 2)
857857
g5_phy_disable_cpu1();
858858
#endif /* CONFIG_PPC64 */

‎arch/powerpc/platforms/powermac/time.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -317,9 +317,9 @@ void __init pmac_calibrate_decr(void)
317317
* calibration. That's better since the VIA itself seems
318318
* to be slightly off. --BenH
319319
*/
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"))
323323
if (via_calibrate_decr())
324324
return;
325325

@@ -328,7 +328,7 @@ void __init pmac_calibrate_decr(void)
328328
* probably implement calibration based on the KL timer on these
329329
* machines anyway... -BenH
330330
*/
331-
if (machine_is_compatible("PowerMac3,5"))
331+
if (of_machine_is_compatible("PowerMac3,5"))
332332
if (via_calibrate_decr())
333333
return;
334334
#endif

0 commit comments

Comments
 (0)