summaryrefslogtreecommitdiff
path: root/board/samsung
diff options
context:
space:
mode:
authorStephen Warren <swarren@nvidia.com>2014-05-05 10:40:14 -0600
committerLukasz Majewski <l.majewski@samsung.com>2014-05-08 10:38:29 +0200
commit36ff05c4f968bf71713644413d64850e48b34145 (patch)
tree2a8cd3e0b6a77cf6100e5a038bb9d6a24c4a470e /board/samsung
parentdc1e746c42d440fcd70aaaf02a1bbce5a4b2a5e6 (diff)
downloadu-boot-imx-36ff05c4f968bf71713644413d64850e48b34145.zip
u-boot-imx-36ff05c4f968bf71713644413d64850e48b34145.tar.gz
u-boot-imx-36ff05c4f968bf71713644413d64850e48b34145.tar.bz2
ums: remove ums_disk_init()
Now that ums_disk_init() is so simple, there's no need for it to be a separate function. Instead, just add it to the tail end of ums_init(). Cc: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
Diffstat (limited to 'board/samsung')
-rw-r--r--board/samsung/common/ums.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/board/samsung/common/ums.c b/board/samsung/common/ums.c
index 42a4901..b35670d 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);
-}