mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 08:42:12 +02:00
dm: Drop the block_dev_desc_t typedef
Use 'struct' instead of a typdef. Also since 'struct block_dev_desc' is long and causes 80-column violations, rename it to struct blk_desc. 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:
10
cmd/sata.c
10
cmd/sata.c
@@ -16,15 +16,15 @@
|
||||
#include <sata.h>
|
||||
|
||||
static int sata_curr_device = -1;
|
||||
block_dev_desc_t sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
|
||||
struct blk_desc sata_dev_desc[CONFIG_SYS_SATA_MAX_DEVICE];
|
||||
|
||||
static unsigned long sata_bread(block_dev_desc_t *block_dev, lbaint_t start,
|
||||
static unsigned long sata_bread(struct blk_desc *block_dev, lbaint_t start,
|
||||
lbaint_t blkcnt, void *dst)
|
||||
{
|
||||
return sata_read(block_dev->dev, start, blkcnt, dst);
|
||||
}
|
||||
|
||||
static unsigned long sata_bwrite(block_dev_desc_t *block_dev, lbaint_t start,
|
||||
static unsigned long sata_bwrite(struct blk_desc *block_dev, lbaint_t start,
|
||||
lbaint_t blkcnt, const void *buffer)
|
||||
{
|
||||
return sata_write(block_dev->dev, start, blkcnt, buffer);
|
||||
@@ -36,7 +36,7 @@ int __sata_initialize(void)
|
||||
int i;
|
||||
|
||||
for (i = 0; i < CONFIG_SYS_SATA_MAX_DEVICE; i++) {
|
||||
memset(&sata_dev_desc[i], 0, sizeof(struct block_dev_desc));
|
||||
memset(&sata_dev_desc[i], 0, sizeof(struct blk_desc));
|
||||
sata_dev_desc[i].if_type = IF_TYPE_SATA;
|
||||
sata_dev_desc[i].dev = i;
|
||||
sata_dev_desc[i].part_type = PART_TYPE_UNKNOWN;
|
||||
@@ -75,7 +75,7 @@ __weak int __sata_stop(void)
|
||||
int sata_stop(void) __attribute__((weak, alias("__sata_stop")));
|
||||
|
||||
#ifdef CONFIG_PARTITIONS
|
||||
block_dev_desc_t *sata_get_dev(int dev)
|
||||
struct blk_desc *sata_get_dev(int dev)
|
||||
{
|
||||
return (dev < CONFIG_SYS_SATA_MAX_DEVICE) ? &sata_dev_desc[dev] : NULL;
|
||||
}
|
||||
|
Reference in New Issue
Block a user