Skip to content
Commit b677b885 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Chris Ball
Browse files

mmc: rtsx: fix possible linking error if built-in



rtsx_usb_sdmmc module uses the LED classdev if available, but the code
failed to consider the situation that it is built-in and the LED classdev is a
module, leading to following linking error:

   LD      init/built-in.o
drivers/built-in.o: In function `rtsx_usb_sdmmc_drv_remove':
rtsx_usb_sdmmc.c:(.text+0x2a018e): undefined reference to
`led_classdev_unregister'
drivers/built-in.o: In function `rtsx_usb_sdmmc_drv_probe':
rtsx_usb_sdmmc.c:(.text+0x2a197e): undefined reference to
`led_classdev_register'

Fix by excluding such condition when defining macro RTSX_USB_USE_LEDS_CLASS.

Signed-off-by: default avatarRoger Tseng <rogerable@realtek.com>
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarChris Ball <chris@printf.net>
parent 91769986
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment