android_kernel_oneplus_msm8998/include/linux/mmc
Kim, Milo 39f7e08af3 leds: trigger: use inline functions instead of macros
Macros are used in case that an inline function doesn't work.
Otherwise, use an empty inline function.

(a) Case of !CONFIG_LEDS_TRIGGERS
Following macros are replaced with inline functions.
  led_trigger_register_simple()
  led_trigger_unregister_simple()
  led_trigger_event()
To make inline types, the structure, 'led_trigger' should be defined.
This structure has no member at all.

(b) Case of !CONFIG_LEDS_TRIGGER_IDE_DISK
ledtrig_ide_activity() macro is replaced with an inline function as well.

(c) DEFINE_LED_TRIGGER() and DEFINE_LED_TRIGGER_GLOBAL()
Struct 'led_trigger' is defined both cases, with CONFIG_LEDS_TRIGGERS and
without CONFIG_LEDS_TRIGGERS.
Those macros are moved out of CONFIG_LED_TRIGGERS because of no-dependency
on CONFIG_LEDS_TRIGGERS.

(d) Fix build errors in mmc-core driver
After replacing macros with inline functions, following build errors occur.
(condition: CONFIG_LEDS_TRIGGERS is not set)

  drivers/mmc/core/core.c: In function 'mmc_request_done':
  drivers/mmc/core/core.c:164:25: error: 'struct mmc_host' has no member named 'led'
  drivers/mmc/core/core.c: In function 'mmc_start_request':
  drivers/mmc/core/core.c:254:24: error: 'struct mmc_host' has no member named 'led'
  make[3]: *** [drivers/mmc/core/core.o] Error 1

The reason of these errors is non-existent member variable, 'led'.
It is only valid when CONFIG_LEDS_TRIGGERS is set.
But now, it can be used without this dependency.
To fix build errors, member 'led' is always used without its config option in
'include/linux/mmc/host.h'.

Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
2013-04-01 11:04:50 -07:00
..
boot.h mmc: Standardize header file inclusion checks. 2011-07-20 17:20:48 -04:00
card.h mmc: support packed write command for eMMC4.5 devices 2013-02-24 14:37:16 -05:00
core.h mmc: support packed write command for eMMC4.5 devices 2013-02-24 14:37:16 -05:00
dw_mmc.h mmc: dw_mmc: Remove DW_MCI_QUIRK_NO_WRITE_PROTECT 2013-02-24 14:36:55 -05:00
host.h leds: trigger: use inline functions instead of macros 2013-04-01 11:04:50 -07:00
mmc.h mmc: add packed command feature of eMMC4.5 2013-02-24 14:37:15 -05:00
pm.h mmc: Standardize header file inclusion checks. 2011-07-20 17:20:48 -04:00
sd.h mmc: Standardize header file inclusion checks. 2011-07-20 17:20:48 -04:00
sdhci-pci-data.h mmc: sdhci-pci: add platform data 2012-01-11 23:58:47 -05:00
sdhci-spear.h Viresh has moved 2012-06-20 14:39:36 -07:00
sdhci.h mmc: sdhci: enhance preset value function 2013-02-24 14:37:11 -05:00
sdio.h mmc: sdio: fix setting card data bus width as 4-bit 2012-06-06 09:22:53 -04:00
sdio_func.h mmc: Standardize header file inclusion checks. 2011-07-20 17:20:48 -04:00
sdio_ids.h mmc: Standardize header file inclusion checks. 2011-07-20 17:20:48 -04:00
sh_mmcif.h Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2012-07-24 17:12:54 -07:00
sh_mobile_sdhi.h mmc: sh_mobile_sdhi: remove unused .pdata field 2013-02-24 14:37:22 -05:00
slot-gpio.h mmc: core: add WP pin handler to slot functions 2012-07-21 00:02:18 -04:00
tmio.h mmc: sdhi: Add write16_hook 2011-07-20 17:20:57 -04:00