From eec293cd7abf9840bee8c709cf662b2176fc0dfd Mon Sep 17 00:00:00 2001 From: shichunma Date: Thu, 4 Jun 2026 14:51:42 +0800 Subject: [PATCH] drivers/mmcsd/mmcsd_sdio.c: guard SDIO_REGISTERCALLBACK use SDIO_REGISTERCALLBACK is only defined when both CONFIG_SCHED_WORKQUEUE and CONFIG_SCHED_HPWORK are enabled. Guard the callback registration call in mmcsd_sdio.c so the source matches the SDIO callback API availability and avoids build issues when HPWORK support is not configured. Signed-off-by: Jerry Ma --- 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 85275c79f91..470ec07dc89 100644 --- a/drivers/mmcsd/mmcsd_sdio.c +++ b/drivers/mmcsd/mmcsd_sdio.c @@ -4509,7 +4509,9 @@ static int mmcsd_hwinitialize(FAR struct mmcsd_state_s *priv) * removed from the slot (Initially all callbacks are disabled). */ +#if defined(CONFIG_SCHED_WORKQUEUE) && defined(CONFIG_SCHED_HPWORK) SDIO_REGISTERCALLBACK(priv->dev, mmcsd_mediachange, (FAR void *)priv); +#endif /* Is there a card in the slot now? For an MMC/SD card, there are three * possible card detect mechanisms: