提交 99c7a51a 编写于 作者: S Simon Glass 提交者: Tom Rini

spl: mmc: Rename 'mmc' variable to 'mmcp'

The 'p' suffix makes it more obvious that we are dealing with a pointer
to a (pointer) value that will be returned to its caller.
Signed-off-by: NSimon Glass <sjg@chromium.org>
Acked-by: NNikita Kiryanov <nikita@compulab.co.il>
Tested-by: NMichal Simek <michal.simek@xilinx.com>
上级 d773a008
...@@ -79,7 +79,7 @@ int spl_mmc_get_device_index(u32 boot_device) ...@@ -79,7 +79,7 @@ int spl_mmc_get_device_index(u32 boot_device)
} }
#ifdef CONFIG_DM_MMC #ifdef CONFIG_DM_MMC
static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device) static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
{ {
struct udevice *dev; struct udevice *dev;
int err, mmc_dev; int err, mmc_dev;
...@@ -104,12 +104,12 @@ static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device) ...@@ -104,12 +104,12 @@ static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device)
return err; return err;
} }
*mmc = NULL; *mmcp = NULL;
*mmc = mmc_get_mmc_dev(dev); *mmcp = mmc_get_mmc_dev(dev);
return *mmc != NULL ? 0 : -ENODEV; return *mmcp != NULL ? 0 : -ENODEV;
} }
#else #else
static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device) static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
{ {
int err, mmc_dev; int err, mmc_dev;
...@@ -126,8 +126,8 @@ static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device) ...@@ -126,8 +126,8 @@ static int spl_mmc_find_device(struct mmc **mmc, u32 boot_device)
} }
/* We register only one device. So, the dev id is always 0 */ /* We register only one device. So, the dev id is always 0 */
*mmc = find_mmc_device(mmc_dev); *mmcp = find_mmc_device(mmc_dev);
if (!*mmc) { if (!*mmcp) {
#ifdef CONFIG_SPL_LIBCOMMON_SUPPORT #ifdef CONFIG_SPL_LIBCOMMON_SUPPORT
puts("spl: mmc device not found\n"); puts("spl: mmc device not found\n");
#endif #endif
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册