Skip to content

Commit 492917f

Browse files
mpredfearngregkh
authored andcommitted
MIPS: TXx9: use IS_BUILTIN() for CONFIG_LEDS_CLASS
[ Upstream commit 0cde5b4 ] When commit b27311e ("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 b33b440 ("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: b27311e ("MIPS: TXx9: Add RBTX4939 board support") Signed-off-by: Matt Redfearn <[email protected]> Reviewed-by: James Hogan <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: [email protected] Patchwork: https://patchwork.linux-mips.org/patch/18544/ Signed-off-by: James Hogan <[email protected]> Signed-off-by: Sasha Levin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent e7260c8 commit 492917f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

arch/mips/txx9/rbtx4939/setup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static void __init rbtx4939_update_ioc_pen(void)
186186

187187
#define RBTX4939_MAX_7SEGLEDS 8
188188

189-
#if IS_ENABLED(CONFIG_LEDS_CLASS)
189+
#if IS_BUILTIN(CONFIG_LEDS_CLASS)
190190
static u8 led_val[RBTX4939_MAX_7SEGLEDS];
191191
struct rbtx4939_led_data {
192192
struct led_classdev cdev;
@@ -261,7 +261,7 @@ static inline void rbtx4939_led_setup(void)
261261

262262
static void __rbtx4939_7segled_putc(unsigned int pos, unsigned char val)
263263
{
264-
#if IS_ENABLED(CONFIG_LEDS_CLASS)
264+
#if IS_BUILTIN(CONFIG_LEDS_CLASS)
265265
unsigned long flags;
266266
local_irq_save(flags);
267267
/* bit7: reserved for LED class */

0 commit comments

Comments
 (0)