mmc: rtsx: fix possible linking error if built-in
authorArnd Bergmann <arnd@arndb.de>
Thu, 8 May 2014 08:27:54 +0000 (10:27 +0200)
committerChris Ball <chris@printf.net>
Mon, 12 May 2014 22:08:23 +0000 (18:08 -0400)
commitb677b8850322b210a81b72ffcc7de85a3df395c5
tree572c644e22de19af83d4e00e27333e3cec584972
parent91769986a724f63db52f3c78c79ac84a5b7045bf
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: Roger Tseng <rogerable@realtek.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Chris Ball <chris@printf.net>
drivers/mmc/host/rtsx_usb_sdmmc.c