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 <shichunma@bestechnic.com>
This commit is contained in:
shichunma 2026-06-04 14:51:42 +08:00 committed by Alan C. Assis
parent 7aef6d3184
commit eec293cd7a

View file

@ -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: