[U-Boot] [PATCH 4/8] ums: remove ums_disk_init()
Stephen Warren
swarren at wwwdotorg.org
Wed Apr 30 23:13:18 CEST 2014
From: Stephen Warren <swarren at nvidia.com>
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: Przemyslaw Marczak <p.marczak at samsung.com>
Cc: Lukasz Majewski <l.majewski at samsung.com>
Signed-off-by: Stephen Warren <swarren at nvidia.com>
---
board/samsung/common/ums.c | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/board/samsung/common/ums.c b/board/samsung/common/ums.c
index 14e3640e355f..68b9f26cac4e 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)
+ return NULL;
+
ums_dev.block_dev = &mmc->block_dev;
ums_dev.start_sector = 0;
ums_dev.num_sectors = mmc->capacity / SECTOR_SIZE;
@@ -47,14 +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 = NULL;
-
- mmc = find_mmc_device(dev_num);
- if (!mmc)
- return NULL;
-
- return ums_disk_init(mmc);
-}
--
1.8.1.5
More information about the U-Boot
mailing list