diff options
Diffstat (limited to 'board/samsung')
-rw-r--r-- | board/samsung/common/ums.c | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/board/samsung/common/ums.c b/board/samsung/common/ums.c index 42a49018f5..b35670d996 100644 --- a/board/samsung/common/ums.c +++ b/board/samsung/common/ums.c @@ -36,8 +36,14 @@ static struct ums ums_dev = { .name = "UMS disk", }; -static struct ums *ums_disk_init(struct mmc *mmc) +struct ums *ums_init(unsigned int dev_num) { + struct mmc *mmc = NULL; + + mmc = find_mmc_device(dev_num); + if (!mmc || mmc_init(mmc)) + return NULL; + ums_dev.block_dev = &mmc->block_dev; ums_dev.start_sector = 0; ums_dev.num_sectors = mmc->capacity / SECTOR_SIZE; @@ -47,12 +53,3 @@ static struct ums *ums_disk_init(struct mmc *mmc) return &ums_dev; } - -struct ums *ums_init(unsigned int dev_num) -{ - struct mmc *mmc = find_mmc_device(dev_num); - - if (!mmc || mmc_init(mmc)) - return NULL; - return ums_disk_init(mmc); -} |