diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-06 14:57:01 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2012-11-06 14:57:01 +0000 |
commit | e99deb5c4af245a03351ed2ec021cdde3e33fbba (patch) | |
tree | fa7c3ed0efb7ac7776edda9b1792a402e9ae827d /nuttx/drivers/mmcsd | |
parent | 9fa8d5d6081fed3401c91a1d6ce0efece97de420 (diff) | |
download | px4-firmware-e99deb5c4af245a03351ed2ec021cdde3e33fbba.tar.gz px4-firmware-e99deb5c4af245a03351ed2ec021cdde3e33fbba.tar.bz2 px4-firmware-e99deb5c4af245a03351ed2ec021cdde3e33fbba.zip |
Patch to removed MMCSD NSLOTS warning from Freddie Chopin
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5316 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/drivers/mmcsd')
-rw-r--r-- | nuttx/drivers/mmcsd/Make.defs | 12 | ||||
-rw-r--r-- | nuttx/drivers/mmcsd/mmcsd_sdio.c | 5 | ||||
-rw-r--r-- | nuttx/drivers/mmcsd/mmcsd_spi.c | 5 |
3 files changed, 21 insertions, 1 deletions
diff --git a/nuttx/drivers/mmcsd/Make.defs b/nuttx/drivers/mmcsd/Make.defs index 850456597..455ac286d 100644 --- a/nuttx/drivers/mmcsd/Make.defs +++ b/nuttx/drivers/mmcsd/Make.defs @@ -33,9 +33,17 @@ # ############################################################################ +if ($(CONFIG_MMCSD),y) + # Include MMC/SD drivers -CSRCS += mmcsd_sdio.c mmcsd_spi.c mmcsd_debug.c +if ($(CONFIG_MMCSD_SDIO),y) +CSRCS += mmcsd_sdio.c +endif + +if ($(CONFIG_MMCSD_SPI),y) +CSRCS += mmcsd_spi.c mmcsd_debug.c +endif # Include MMC/SD driver build support @@ -43,4 +51,6 @@ DEPPATH += --dep-path mmcsd VPATH += :mmcsd CFLAGS += ${shell $(TOPDIR)/tools/incdir.sh $(INCDIROPT) "$(CC)" $(TOPDIR)/drivers/mmcsd} +endif + diff --git a/nuttx/drivers/mmcsd/mmcsd_sdio.c b/nuttx/drivers/mmcsd/mmcsd_sdio.c index d0bc6659c..64b045bc2 100644 --- a/nuttx/drivers/mmcsd/mmcsd_sdio.c +++ b/nuttx/drivers/mmcsd/mmcsd_sdio.c @@ -38,6 +38,9 @@ ****************************************************************************/ #include <nuttx/config.h> + +#if defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SDIO) + #include <nuttx/compiler.h> #include <sys/types.h> @@ -3178,3 +3181,5 @@ errout_with_alloc: kfree(priv); return ret; } + +#endif /* defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SDIO) */ diff --git a/nuttx/drivers/mmcsd/mmcsd_spi.c b/nuttx/drivers/mmcsd/mmcsd_spi.c index 39b570581..d437b7fea 100644 --- a/nuttx/drivers/mmcsd/mmcsd_spi.c +++ b/nuttx/drivers/mmcsd/mmcsd_spi.c @@ -38,6 +38,9 @@ ****************************************************************************/ #include <nuttx/config.h> + +#if defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SPI) + #include <sys/types.h> #include <stdint.h> @@ -1878,3 +1881,5 @@ int mmcsd_spislotinitialize(int minor, int slotno, FAR struct spi_dev_s *spi) (void)SPI_REGISTERCALLBACK(spi, mmcsd_mediachanged, (void*)slot); return OK; } + +#endif /* defined (CONFIG_MMCSD) && defined (CONFIG_MMCSD_SPI) */ |