mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 23:24:38 +00:00
ums: always initialize mmc before ums_disk_init()
In cases when MMC hadn't been initialized before, ie. by the user or other subsystem, it was still uninitialized while UMS media capacity check, leading to broken ums command. UMS has to initialize resources it uses. Tested on Samsung Goni. Signed-off-by: Mateusz Zalega <m.zalega@samsung.com> Tested-by: Mateusz Zalega <m.zalega@samsung.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com>
This commit is contained in:
parent
b7d4259af2
commit
41c2d60b3a
1 changed files with 2 additions and 4 deletions
|
@ -66,11 +66,9 @@ static struct ums *ums_disk_init(struct mmc *mmc)
|
||||||
|
|
||||||
struct ums *ums_init(unsigned int dev_num)
|
struct ums *ums_init(unsigned int dev_num)
|
||||||
{
|
{
|
||||||
struct mmc *mmc = NULL;
|
struct mmc *mmc = find_mmc_device(dev_num);
|
||||||
|
|
||||||
mmc = find_mmc_device(dev_num);
|
if (!mmc || mmc_init(mmc))
|
||||||
if (!mmc)
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
return ums_disk_init(mmc);
|
return ums_disk_init(mmc);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue