From c482437325b5fe044996586ba8986a9d190c583e Mon Sep 17 00:00:00 2001 From: Alan Carvalho de Assis Date: Thu, 26 Jan 2017 07:44:17 -0600 Subject: [PATCH] MMCSD_SDIO: Only wait for card ejected if card detection is supported --- drivers/mmcsd/mmcsd_sdio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmcsd/mmcsd_sdio.c b/drivers/mmcsd/mmcsd_sdio.c index b59b9f2fa36..815854b3bb9 100644 --- a/drivers/mmcsd/mmcsd_sdio.c +++ b/drivers/mmcsd/mmcsd_sdio.c @@ -3050,9 +3050,11 @@ static int mmcsd_probe(FAR struct mmcsd_state_s *priv) finfo("Capacity: %lu Kbytes\n", (unsigned long)(priv->capacity / 1024)); priv->mediachanged = true; +#ifdef CONFIG_MMCSD_HAVECARDDETECT /* Set up to receive asynchronous, media removal events */ SDIO_CALLBACKENABLE(priv->dev, SDIOMEDIA_EJECTED); +#endif } /* REVISIT: There is a problem here. If mmcsd_initialize() returns a