MIPS: use IS_ENABLED() macro
Subsystems (2)
cover MIPS: use IS_ENABLED() macro
This patch replaces the traditionnal use of:CONFIG_FOO || CONFIG_FOO_MODULE by IS_ENABLED(CONFIG_FOO)
Florian Fainelli (6):
MIPS: Alchemy: use IS_ENABLED() macro
MIPS: PNX833x: use IS_ENABLED() macro
MIPS: TXX9: use IS_ENABLED() macro
MIPS: TX49XX: use IS_ENABLED()
MIPS: DEC: use IS_ENABLED()
MIPS: loongson: use IS_ENABLED()
arch/mips/alchemy/board-mtx1.c | 4 ++-- arch/mips/alchemy/devboards/pb1100.c | 4 ++-- arch/mips/alchemy/devboards/pb1500.c | 4 ++-- arch/mips/dec/prom/memory.c | 2 +- arch/mips/include/asm/mach-loongson/loongson.h | 3 ++- arch/mips/include/asm/mach-tx49xx/mangle-port.h | 2 +- arch/mips/pnx833x/stb22x/board.c | 4 ++-- arch/mips/txx9/generic/setup.c | 12 +++++------- arch/mips/txx9/generic/setup_tx4939.c | 2 +- arch/mips/txx9/rbtx4939/setup.c | 11 +++++------ 10 files changed, 23 insertions(+), 25 deletions(-)
Signature · 1 line
1.7.5.4
PATCH 1/6 MIPS: Alchemy: use IS_ENABLED() macro
Signed-off-by Florian Fainelli <[email protected]>
--- arch/mips/alchemy/board-mtx1.c | 4 ++-- arch/mips/alchemy/devboards/pb1100.c | 4 ++-- arch/mips/alchemy/devboards/pb1500.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
arch/mips/alchemy/board-mtx1.c +2 -2
@@ -81,10 +81,10 @@ static void mtx1_power_off(void)void __init board_setup (void ) { -#if defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE ) +#if IS_ENABLED (CONFIG_USB_OHCI_HCD )/* Enable USB power switch */ alchemy_gpio_direction_output (204 ,0 ); -#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */ +#endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */ /* Initialize sys_pinfunc */ au_writel (SYS_PF_NI2 ,SYS_PINFUNC );
arch/mips/alchemy/devboards/pb1100.c +2 -2
@@ -46,7 +46,7 @@ void __init board_setup(void)alchemy_gpio1_input_enable ();udelay (100 ); -#if defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE ) +#if IS_ENABLED (CONFIG_USB_OHCI_HCD ) {u32 pin_func, sys_freqctrl, sys_clksrc;
@@ -93,7 +93,7 @@ void __init board_setup(void) pin_func |=SYS_PF_USB ;au_writel (pin_func,SYS_PINFUNC ); } -#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */ +#endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */ /* Enable sys bus clock divider when IDLE state or no bus activity. */ au_writel (au_readl (SYS_POWERCTRL ) | (0x3 <<5 ),SYS_POWERCTRL );
arch/mips/alchemy/devboards/pb1500.c +2 -2
@@ -53,7 +53,7 @@ void __init board_setup(void)alchemy_gpio_direction_input (201 );alchemy_gpio_direction_input (203 ); -#if defined(CONFIG_USB_OHCI_HCD ) || defined(CONFIG_USB_OHCI_HCD_MODULE ) +#if IS_ENABLED (CONFIG_USB_OHCI_HCD )/* Zero and disable FREQ2 */ sys_freqctrl =au_readl (SYS_FREQCTRL0 );
@@ -87,7 +87,7 @@ void __init board_setup(void)/* 2nd USB port is USB host */ pin_func |=SYS_PF_USB ;au_writel (pin_func,SYS_PINFUNC ); -#endif /* defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE) */ +#endif /* IS_ENABLED(CONFIG_USB_OHCI_HCD) */ #ifdef CONFIG_PCI {
Signature · 1 line
1.7.5.4
PATCH 2/6 MIPS: PNX833x: use IS_ENABLED() macro
In reply to Florian FainelliSigned-off-by Florian Fainelli <[email protected]>
--- arch/mips/pnx833x/stb22x/board.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/mips/pnx833x/stb22x/board.c +2 -2
@@ -91,7 +91,7 @@ void __init pnx833x_board_setup(void)pnx833x_gpio_select_function_alt (32 );pnx833x_gpio_select_function_alt (33 ); -#if defined(CONFIG_MTD_NAND_PLATFORM ) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE ) +#if IS_ENABLED (CONFIG_MTD_NAND_PLATFORM )/* Setup MIU for NAND access on CS0... * * (it seems that we must also configure CS1 for reliable operation,
@@ -117,7 +117,7 @@ void __init pnx833x_board_setup(void)pnx833x_gpio_select_output (5 );pnx833x_gpio_write (1 ,5 ); -#elif defined(CONFIG_MTD_CFI ) || defined(CONFIG_MTD_CFI_MODULE ) +#elif IS_ENABLED (CONFIG_MTD_CFI )/* Set up MIU for 16-bit NOR access on CS0 and CS1... */
Signature · 1 line
1.7.5.4
PATCH 3/6 MIPS: TXX9: use IS_ENABLED() macro
In reply to Florian FainelliSigned-off-by Florian Fainelli <[email protected]>
--- arch/mips/txx9/generic/setup.c | 12 +++++------- arch/mips/txx9/generic/setup_tx4939.c | 2 +- arch/mips/txx9/rbtx4939/setup.c | 11 +++++------ 3 files changed, 11 insertions(+), 14 deletions(-)
arch/mips/txx9/generic/setup.c +5 -7
@@ -632,7 +632,7 @@ void __init txx9_physmap_flash_init(int no, unsigned long addr,unsigned long size, const struct physmap_flash_data *pdata) { -#if defined(CONFIG_MTD_PHYSMAP ) || defined(CONFIG_MTD_PHYSMAP_MODULE ) +#if IS_ENABLED(CONFIG_MTD_PHYSMAP) struct resource res = { .start = addr, .end = addr + size - 1,
@@ -670,8 +670,7 @@ void __init txx9_physmap_flash_init(int no, unsigned long addr,void __init txx9_ndfmc_init (unsigned long baseaddr,const struct txx9ndfmc_platform_data *pdata) { -#if defined(CONFIG_MTD_NAND_TXX9NDFMC ) || \ - defined(CONFIG_MTD_NAND_TXX9NDFMC_MODULE ) +#if IS_ENABLED (CONFIG_MTD_NAND_TXX9NDFMC )struct resource res = { .start = baseaddr, .end = baseaddr + 0x1000 - 1,
@@ -687,7 +686,7 @@ void __init txx9_ndfmc_init(unsigned long baseaddr,#endif } -#if defined(CONFIG_LEDS_GPIO ) || defined(CONFIG_LEDS_GPIO_MODULE ) +#if IS_ENABLED (CONFIG_LEDS_GPIO )static DEFINE_SPINLOCK (txx9_iocled_lock);#define TXX9_IOCLED_MAXLEDS 8
@@ -810,7 +809,7 @@ void __init txx9_iocled_init(unsigned long baseaddr,void __init txx9_dmac_init (int id,unsigned long baseaddr,int irq,const struct txx9dmac_platform_data *pdata) { -#if defined(CONFIG_TXX9_DMAC) || defined(CONFIG_TXX9_DMAC_MODULE) +#if IS_ENABLED(CONFIG_TXX9_DMAC) struct resource res[] = { { .start = baseaddr,
@@ -866,8 +865,7 @@ void __init txx9_aclc_init(unsigned long baseaddr, int irq,unsigned int dma_chan_out, unsigned int dma_chan_in) { -#if defined(CONFIG_SND_SOC_TXX9ACLC) || \ - defined(CONFIG_SND_SOC_TXX9ACLC_MODULE) +#if IS_ENABLED(CONFIG_SND_SOC_TXX9ACLC) unsigned int dma_base = dmac_id *TXX9_DMA_MAX_NR_CHANNELS ; struct resource res[] = { {
arch/mips/txx9/generic/setup_tx4939.c +1 -1
@@ -317,7 +317,7 @@ void __init tx4939_sio_init(unsigned int sclk, unsigned int cts_mask) } } -#if defined(CONFIG_TC35815 ) || defined(CONFIG_TC35815_MODULE ) +#if IS_ENABLED (CONFIG_TC35815 )static u32 tx4939_get_eth_speed (struct net_device *dev) {struct ethtool_cmd cmd;
arch/mips/txx9/rbtx4939/setup.c +5 -6
@@ -40,8 +40,7 @@ static void __init rbtx4939_time_init(void)tx4939_time_init (0 ); } -#if defined(__BIG_ENDIAN) && \ - (defined(CONFIG_SMC91X ) || defined(CONFIG_SMC91X_MODULE )) +#if defined(__BIG_ENDIAN) &&IS_ENABLED (CONFIG_SMC91X )#define HAVE_RBTX4939_IOSWAB #define IS_CE1_ADDR (addr) \ ((((unsigned long)(addr) - IO_BASE) & 0xfff00000) == TXX9_CE(1))
@@ -187,7 +186,7 @@ static void __init rbtx4939_update_ioc_pen(void)#define RBTX4939_MAX_7SEGLEDS 8 -#if defined(CONFIG_LEDS_CLASS) || defined(CONFIG_LEDS_CLASS_MODULE) +#if IS_ENABLED(CONFIG_LEDS_CLASS) static u8 led_val[RBTX4939_MAX_7SEGLEDS]; struct rbtx4939_led_data { struct led_classdev cdev;
@@ -263,7 +262,7 @@ static inline void rbtx4939_led_setup(void)static void __rbtx4939_7segled_putc (unsigned int pos,unsigned char val) { -#if defined(CONFIG_LEDS_CLASS ) || defined(CONFIG_LEDS_CLASS_MODULE ) +#if IS_ENABLED (CONFIG_LEDS_CLASS )unsigned long flags;local_irq_save (flags);/* bit7: reserved for LED class */
@@ -287,7 +286,7 @@ static void rbtx4939_7segled_putc(unsigned int pos, unsigned char val)__rbtx4939_7segled_putc (pos, val); } -#if defined(CONFIG_MTD_RBTX4939 ) || defined(CONFIG_MTD_RBTX4939_MODULE ) +#if IS_ENABLED (CONFIG_MTD_RBTX4939 )/* special mapping for boot rom */ static unsigned long rbtx4939_flash_fixup_ofs (unsigned long ofs) {
@@ -463,7 +462,7 @@ static void __init rbtx4939_device_init(void) .flags = SMC91X_USE_16BIT, };struct platform_device *pdev; -#if defined(CONFIG_TC35815 ) || defined(CONFIG_TC35815_MODULE ) +#if IS_ENABLED (CONFIG_TC35815 )int i, j;unsigned char ethaddr[2 ][6 ];u8 bdipsw =readb (rbtx4939_bdipsw_addr) &0x0f ;
Signature · 1 line
1.7.5.4
PATCH 4/6 MIPS: TX49XX: use IS_ENABLED()
In reply to Florian FainelliSigned-off-by Florian Fainelli <[email protected]>
--- arch/mips/include/asm/mach-tx49xx/mangle-port.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/include/asm/mach-tx49xx/mangle-port.h +1 -1
@@ -9,7 +9,7 @@#define ioswabb (a, x) (x)#define __mem_ioswabb (a, x) (x)#if defined(CONFIG_TOSHIBA_RBTX4939 ) && \ - (defined(CONFIG_SMC91X ) || defined(CONFIG_SMC91X_MODULE )) && \ +IS_ENABLED (CONFIG_SMC91X ) && \ defined(__BIG_ENDIAN)#define NEEDS_TXX9_IOSWABW extern u16 (*ioswabw)(volatile u16 *a,u16 x);
Signature · 1 line
1.7.5.4
PATCH 5/6 MIPS: DEC: use IS_ENABLED()
In reply to Florian FainelliSigned-off-by Florian Fainelli <[email protected]>
--- arch/mips/dec/prom/memory.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/mips/dec/prom/memory.c +1 -1
@@ -101,7 +101,7 @@ void __init prom_free_prom_memory(void)* the first page reserved for the exception handlers. */ -#if defined(CONFIG_DECLANCE ) || defined(CONFIG_DECLANCE_MODULE ) +#if IS_ENABLED (CONFIG_DECLANCE )/* * Leave 128 KB reserved for Lance memory for * IOASIC DECstations.
Signature · 1 line
1.7.5.4
PATCH 6/6 MIPS: loongson: use IS_ENABLED()
In reply to Florian FainelliSigned-off-by Florian Fainelli <[email protected]>
--- arch/mips/include/asm/mach-loongson/loongson.h | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
arch/mips/include/asm/mach-loongson/loongson.h +2 -1
@@ -14,6 +14,7 @@#include <linux/io.h> #include <linux/init.h> #include <linux/irq.h> +#include <linux/kconfig.h> /* loongson internal northbridge initialization */ extern void bonito_irq_init (void );
@@ -66,7 +67,7 @@ extern int mach_i8259_irq(void);#include <linux/interrupt.h> static inline void do_perfcnt_IRQ (void ) { -#if defined(CONFIG_OPROFILE ) || defined(CONFIG_OPROFILE_MODULE ) +#if IS_ENABLED (CONFIG_OPROFILE )do_IRQ (LOONGSON2_PERFCNT_IRQ );#endif }
Signature · 1 line
1.7.5.4