mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-09 03:21:51 +00:00
dm: blk: Rename get_dev() to blk_get_dev()
The current name is too generic. Add a 'blk_' prefix to aid searching and make its purpose clearer. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Stephen Warren <swarren@nvidia.com>
This commit is contained in:
parent
fb1b7be953
commit
db1d9e78e6
6 changed files with 16 additions and 14 deletions
|
@ -106,7 +106,7 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
|
|||
struct blk_desc *dd;
|
||||
|
||||
if (first) {
|
||||
di->cookie = (void *)get_dev(specs[type].name, 0);
|
||||
di->cookie = (void *)blk_get_dev(specs[type].name, 0);
|
||||
if (di->cookie == NULL)
|
||||
return 0;
|
||||
else
|
||||
|
@ -119,7 +119,8 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
|
|||
|
||||
} else {
|
||||
for (i = 0; i < specs[type].max_dev; i++)
|
||||
if (di->cookie == (void *)get_dev(specs[type].name, i)) {
|
||||
if (di->cookie ==
|
||||
(void *)blk_get_dev(specs[type].name, i)) {
|
||||
/* previous cookie found -- advance to the
|
||||
* next device, if possible */
|
||||
|
||||
|
@ -129,7 +130,8 @@ static int dev_stor_get(int type, int first, int *more, struct device_info *di)
|
|||
break;
|
||||
}
|
||||
|
||||
di->cookie = (void *)get_dev(specs[type].name, i);
|
||||
di->cookie = (void *)blk_get_dev(
|
||||
specs[type].name, i);
|
||||
if (di->cookie == NULL)
|
||||
return 0;
|
||||
else
|
||||
|
@ -174,7 +176,7 @@ static int dev_stor_type(struct blk_desc *dd)
|
|||
|
||||
for (i = ENUM_IDE; i < ENUM_MAX; i++)
|
||||
for (j = 0; j < specs[i].max_dev; j++)
|
||||
if (dd == get_dev(specs[i].name, j))
|
||||
if (dd == blk_get_dev(specs[i].name, j))
|
||||
return i;
|
||||
|
||||
return ENUM_MAX;
|
||||
|
@ -313,7 +315,7 @@ static int dev_stor_is_valid(int type, struct blk_desc *dd)
|
|||
int i;
|
||||
|
||||
for (i = 0; i < specs[type].max_dev; i++)
|
||||
if (dd == get_dev(specs[type].name, i))
|
||||
if (dd == blk_get_dev(specs[type].name, i))
|
||||
if (dd->type != DEV_TYPE_UNKNOWN)
|
||||
return 1;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue