@@ -2792,7 +2792,6 @@ static void __init flatten_device_tree(void)
2792
2792
dt_struct_start , dt_struct_end );
2793
2793
}
2794
2794
2795
- #ifdef CONFIG_PPC_CHRP
2796
2795
/*
2797
2796
* Pegasos and BriQ lacks the "ranges" property in the isa node
2798
2797
* Pegasos needs decimal IRQ 14/15, not hexadecimal
@@ -2843,11 +2842,7 @@ static void __init fixup_device_tree_chrp(void)
2843
2842
}
2844
2843
}
2845
2844
}
2846
- #else
2847
- #define fixup_device_tree_chrp ()
2848
- #endif
2849
2845
2850
- #if defined(CONFIG_PPC64 ) && defined(CONFIG_PPC_PMAC )
2851
2846
static void __init fixup_device_tree_pmac64 (void )
2852
2847
{
2853
2848
phandle u3 , i2c , mpic ;
@@ -2887,11 +2882,7 @@ static void __init fixup_device_tree_pmac64(void)
2887
2882
prom_setprop (i2c , "/u3@0,f8000000/i2c@f8001000" , "interrupt-parent" ,
2888
2883
& parent , sizeof (parent ));
2889
2884
}
2890
- #else
2891
- #define fixup_device_tree_pmac64 ()
2892
- #endif
2893
2885
2894
- #ifdef CONFIG_PPC_PMAC
2895
2886
static void __init fixup_device_tree_pmac (void )
2896
2887
{
2897
2888
__be32 val = 1 ;
@@ -2911,11 +2902,7 @@ static void __init fixup_device_tree_pmac(void)
2911
2902
prom_setprop (node , NULL , "#size-cells" , & val , sizeof (val ));
2912
2903
}
2913
2904
}
2914
- #else
2915
- static inline void fixup_device_tree_pmac (void ) { }
2916
- #endif
2917
2905
2918
- #ifdef CONFIG_PPC_EFIKA
2919
2906
/*
2920
2907
* The MPC5200 FEC driver requires an phy-handle property to tell it how
2921
2908
* to talk to the phy. If the phy-handle property is missing, then this
@@ -3047,11 +3034,7 @@ static void __init fixup_device_tree_efika(void)
3047
3034
/* Make sure ethernet phy-handle property exists */
3048
3035
fixup_device_tree_efika_add_phy ();
3049
3036
}
3050
- #else
3051
- #define fixup_device_tree_efika ()
3052
- #endif
3053
3037
3054
- #ifdef CONFIG_PPC_PASEMI_NEMO
3055
3038
/*
3056
3039
* CFE supplied on Nemo is broken in several ways, biggest
3057
3040
* problem is that it reassigns ISA interrupts to unused mpic ints.
@@ -3127,17 +3110,23 @@ static void __init fixup_device_tree_pasemi(void)
3127
3110
3128
3111
prom_setprop (iob , name , "device_type" , "isa" , sizeof ("isa" ));
3129
3112
}
3130
- #else /* !CONFIG_PPC_PASEMI_NEMO */
3131
- static inline void fixup_device_tree_pasemi (void ) { }
3132
- #endif
3133
3113
3134
3114
static void __init fixup_device_tree (void )
3135
3115
{
3136
- fixup_device_tree_chrp ();
3137
- fixup_device_tree_pmac ();
3138
- fixup_device_tree_pmac64 ();
3139
- fixup_device_tree_efika ();
3140
- fixup_device_tree_pasemi ();
3116
+ if (IS_ENABLED (CONFIG_PPC_CHRP ))
3117
+ fixup_device_tree_chrp ();
3118
+
3119
+ if (IS_ENABLED (CONFIG_PPC_PMAC ))
3120
+ fixup_device_tree_pmac ();
3121
+
3122
+ if (IS_ENABLED (CONFIG_PPC_PMAC ) && IS_ENABLED (CONFIG_PPC64 ))
3123
+ fixup_device_tree_pmac64 ();
3124
+
3125
+ if (IS_ENABLED (CONFIG_PPC_EFIKA ))
3126
+ fixup_device_tree_efika ();
3127
+
3128
+ if (IS_ENABLED (CONFIG_PPC_PASEMI_NEMO ))
3129
+ fixup_device_tree_pasemi ();
3141
3130
}
3142
3131
3143
3132
static void __init prom_find_boot_cpu (void )
0 commit comments