diff options
author | Simon Glass <sjg@chromium.org> | 2016-02-29 15:25:34 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2016-03-14 15:34:50 -0600 |
commit | 4101f6879256720b30df712089a3df18565f9203 (patch) | |
tree | d7c68d6fd095deedef273d408907290f7fb17a40 /drivers/block | |
parent | b391d743363247bf502fb0b5ca098246ea5a1512 (diff) | |
download | u-boot-imx-4101f6879256720b30df712089a3df18565f9203.zip u-boot-imx-4101f6879256720b30df712089a3df18565f9203.tar.gz u-boot-imx-4101f6879256720b30df712089a3df18565f9203.tar.bz2 |
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>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/dwc_ahsata.c | 4 | ||||
-rw-r--r-- | drivers/block/sandbox.c | 12 | ||||
-rw-r--r-- | drivers/block/systemace.c | 8 |
3 files changed, 12 insertions, 12 deletions
diff --git a/drivers/block/dwc_ahsata.c b/drivers/block/dwc_ahsata.c index bc072f3..6ec52a9 100644 --- a/drivers/block/dwc_ahsata.c +++ b/drivers/block/dwc_ahsata.c @@ -620,7 +620,7 @@ int reset_sata(int dev) static void dwc_ahsata_print_info(int dev) { - block_dev_desc_t *pdev = &(sata_dev_desc[dev]); + struct blk_desc *pdev = &(sata_dev_desc[dev]); printf("SATA Device Info:\n\r"); #ifdef CONFIG_SYS_64BIT_LBA @@ -956,7 +956,7 @@ int scan_sata(int dev) struct ahci_probe_ent *probe_ent = (struct ahci_probe_ent *)sata_dev_desc[dev].priv; u8 port = probe_ent->hard_port_no; - block_dev_desc_t *pdev = &(sata_dev_desc[dev]); + struct blk_desc *pdev = &(sata_dev_desc[dev]); id = (u16 *)memalign(ARCH_DMA_MINALIGN, roundup(ARCH_DMA_MINALIGN, diff --git a/drivers/block/sandbox.c b/drivers/block/sandbox.c index 170f0fa..dd21400 100644 --- a/drivers/block/sandbox.c +++ b/drivers/block/sandbox.c @@ -22,7 +22,7 @@ static struct host_block_dev *find_host_device(int dev) return NULL; } -static unsigned long host_block_read(block_dev_desc_t *block_dev, +static unsigned long host_block_read(struct blk_desc *block_dev, unsigned long start, lbaint_t blkcnt, void *buffer) { @@ -44,7 +44,7 @@ static unsigned long host_block_read(block_dev_desc_t *block_dev, return -1; } -static unsigned long host_block_write(block_dev_desc_t *block_dev, +static unsigned long host_block_write(struct blk_desc *block_dev, unsigned long start, lbaint_t blkcnt, const void *buffer) { @@ -89,7 +89,7 @@ int host_dev_bind(int dev, char *filename) return 1; } - block_dev_desc_t *blk_dev = &host_dev->blk_dev; + struct blk_desc *blk_dev = &host_dev->blk_dev; blk_dev->if_type = IF_TYPE_HOST; blk_dev->priv = host_dev; blk_dev->blksz = 512; @@ -103,7 +103,7 @@ int host_dev_bind(int dev, char *filename) return 0; } -int host_get_dev_err(int dev, block_dev_desc_t **blk_devp) +int host_get_dev_err(int dev, struct blk_desc **blk_devp) { struct host_block_dev *host_dev = find_host_device(dev); @@ -117,9 +117,9 @@ int host_get_dev_err(int dev, block_dev_desc_t **blk_devp) return 0; } -block_dev_desc_t *host_get_dev(int dev) +struct blk_desc *host_get_dev(int dev) { - block_dev_desc_t *blk_dev; + struct blk_desc *blk_dev; if (host_get_dev_err(dev, &blk_dev)) return NULL; diff --git a/drivers/block/systemace.c b/drivers/block/systemace.c index b974e80..ea18c0d 100644 --- a/drivers/block/systemace.c +++ b/drivers/block/systemace.c @@ -69,11 +69,11 @@ static u16 ace_readw(unsigned off) return in16(base + off); } -static unsigned long systemace_read(block_dev_desc_t *block_dev, +static unsigned long systemace_read(struct blk_desc *block_dev, unsigned long start, lbaint_t blkcnt, void *buffer); -static block_dev_desc_t systemace_dev = { 0 }; +static struct blk_desc systemace_dev = { 0 }; static int get_cf_lock(void) { @@ -105,7 +105,7 @@ static void release_cf_lock(void) } #ifdef CONFIG_PARTITIONS -block_dev_desc_t *systemace_get_dev(int dev) +struct blk_desc *systemace_get_dev(int dev) { /* The first time through this, the systemace_dev object is not yet initialized. In that case, fill it in. */ @@ -137,7 +137,7 @@ block_dev_desc_t *systemace_get_dev(int dev) * the dev_desc) to read blocks of data. The return value is the * number of blocks read. A zero return indicates an error. */ -static unsigned long systemace_read(block_dev_desc_t *block_dev, +static unsigned long systemace_read(struct blk_desc *block_dev, unsigned long start, lbaint_t blkcnt, void *buffer) { |