Skip to contentSkip to conversation

m68knommu: fix FEC platform device registration when driver is modular

PATCH In review Greg Ungerer 2 participants 3 messages Jan 11, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/m68k/coldfire/device.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/m68k/coldfire/device.c +2 -2
index 71ea4c0..a0fc0c1 100644
@@ -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,
Signature · 1 line
1.9.1
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Greg Ungerer

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.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#2 lore raw
Quoted 10 lines · Geert Uytterhoeven
Quoted 7 lines · Greg Ungerer

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.

Thanks Geert!

Regards
Greg