From: Greg Ungerer Date: Mon, 11 Jan 2016 00:07:49 +0000 (+1000) Subject: m68knommu: fix FEC platform device registration when driver is modular X-Git-Tag: next-20160308~117^2~1 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=ca6fafd183d6d687a7957e5328ecefc785f22a5a;p=karo-tx-linux.git m68knommu: fix FEC platform device registration when driver is modular The FEC (Fast Ethernet Crontroller) module on many ColdFire parts can be compiled into the kernel, or as a module. Therefore the platform device support for it is required whenever the driver is enabled - not just when built into the kernel. Use IS_ENABLED(CONFIG_FEC) instead of a conditional check on only the driver being built into the kernel. Signed-off-by: Greg Ungerer Acked-by: Geert Uytterhoeven --- diff --git a/arch/m68k/coldfire/device.c b/arch/m68k/coldfire/device.c index 71ea4c02795d..a0fc0c192427 100644 --- a/arch/m68k/coldfire/device.c +++ b/arch/m68k/coldfire/device.c @@ -89,7 +89,7 @@ static struct platform_device mcf_uart = { .dev.platform_data = mcf_uart_platform_data, }; -#ifdef CONFIG_FEC +#if IS_ENABLED(CONFIG_FEC) #ifdef CONFIG_M5441x #define FEC_NAME "enet-fec" @@ -329,7 +329,7 @@ static struct platform_device mcf_qspi = { static struct platform_device *mcf_devices[] __initdata = { &mcf_uart, -#ifdef CONFIG_FEC +#if IS_ENABLED(CONFIG_FEC) &mcf_fec0, #ifdef MCFFEC_BASE1 &mcf_fec1,