OpenCloudOS-Kernel/arch/mips/txx9
Matt Redfearn 0cde5b44a3
MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS
When commit b27311e1ca ("MIPS: TXx9: Add RBTX4939 board support")
added board support for the RBTX4939, it added a call to
led_classdev_register even if the LED class is built as a module.
Built-in arch code cannot call module code directly like this. Commit
b33b440737 ("MIPS: TXX9: use IS_ENABLED() macro") subsequently
changed the inclusion of this code to a single check that
CONFIG_LEDS_CLASS is either builtin or a module, but the same issue
remains.

This leads to MIPS allmodconfig builds failing when CONFIG_MACH_TX49XX=y
is set:

arch/mips/txx9/rbtx4939/setup.o: In function `rbtx4939_led_probe':
setup.c:(.init.text+0xc0): undefined reference to `of_led_classdev_register'
make: *** [Makefile:999: vmlinux] Error 1

Fix this by using the IS_BUILTIN() macro instead.

Fixes: b27311e1ca ("MIPS: TXx9: Add RBTX4939 board support")
Signed-off-by: Matt Redfearn <matt.redfearn@mips.com>
Reviewed-by: James Hogan <jhogan@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/18544/
Signed-off-by: James Hogan <jhogan@kernel.org>
2018-02-05 13:32:17 +00:00
..
generic License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
jmr3927 MIPS: TXx9: Modernize printing of kernel messages 2017-01-03 16:34:32 +01:00
rbtx4927 MIPS: TXx9: tx49xx: Move GPIO setup from .mem_setup() to .arch_init() 2016-10-04 16:13:57 +02:00
rbtx4938 MIPS: TXx9: Modernize printing of kernel messages 2017-01-03 16:34:32 +01:00
rbtx4939 MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS 2018-02-05 13:32:17 +00:00
Kconfig License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Platform MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00