diff --git a/arch/arm/src/cxd56xx/cxd56_emmc.c b/arch/arm/src/cxd56xx/cxd56_emmc.c index 4d56aa040f..8cf697a15b 100644 --- a/arch/arm/src/cxd56xx/cxd56_emmc.c +++ b/arch/arm/src/cxd56xx/cxd56_emmc.c @@ -932,6 +932,10 @@ static int cxd56_emmc_geometry(struct inode *inode, return OK; } +/**************************************************************************** + * Public Functions + ****************************************************************************/ + int cxd56_emmcinitialize(void) { struct cxd56_emmc_state_s *priv = &g_emmcdev; @@ -967,21 +971,25 @@ int cxd56_emmcinitialize(void) } ret = register_blockdriver("/dev/emmc0", &g_bops, 0, priv); - if (ret) + if (ret < 0) { ferr("register_blockdriver failed: %d\n", -ret); + } + + return ret; +} + +int cxd56_emmcuninitialize(void) +{ + int ret; + + ret = unregister_blockdriver("/dev/emmc0"); + if (ret < 0) + { + ferr("unregister_blockdriver failed: %d\n", -ret); return ret; } - return OK; -} - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -int emmc_uninitialize(void) -{ /* Send power off command */ emmc_switchcmd(EXTCSD_PON, EXTCSD_PON_POWERED_OFF_LONG); diff --git a/arch/arm/src/cxd56xx/cxd56_emmc.h b/arch/arm/src/cxd56xx/cxd56_emmc.h index 91f3211e43..5dcd35cee2 100644 --- a/arch/arm/src/cxd56xx/cxd56_emmc.h +++ b/arch/arm/src/cxd56xx/cxd56_emmc.h @@ -43,7 +43,7 @@ extern "C" ****************************************************************************/ int cxd56_emmcinitialize(void); -void cxd56_emmcuninitialize(void); +int cxd56_emmcuninitialize(void); #undef EXTERN #ifdef __cplusplus