]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
sf: nr_sectors -> n_sectors
authorJagan Teki <jagan@openedev.com>
Sun, 30 Oct 2016 17:46:15 +0000 (23:16 +0530)
committerJagan Teki <jagan@openedev.com>
Fri, 18 Nov 2016 07:34:53 +0000 (13:04 +0530)
Rename nr_sectors as n_sectors to sync with Linux.

Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Vignesh R <vigneshr@ti.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
Cc: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jagan Teki <jagan@openedev.com>
Tested-by: Jagan Teki <jagan@openedev.com>
Reviewed-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
drivers/mtd/spi/sandbox.c
drivers/mtd/spi/sf_internal.h
drivers/mtd/spi/sf_params.c
drivers/mtd/spi/spi_flash.c

index 09ce7837ea9e3d75e5b23a730a02c227e8d9d160..4944059fa3f16c1d8710089f18e92246854bea3b 100644 (file)
@@ -289,7 +289,7 @@ static int sandbox_sf_process_cmd(struct sandbox_spi_flash *sbsf, const u8 *rx,
                /* we only support erase here */
                if (sbsf->cmd == CMD_ERASE_CHIP) {
                        sbsf->erase_size = sbsf->data->sector_size *
-                               sbsf->data->nr_sectors;
+                               sbsf->data->n_sectors;
                } else if (sbsf->cmd == CMD_ERASE_4K && (flags & SECT_4K)) {
                        sbsf->erase_size = 4 << 10;
                } else if (sbsf->cmd == CMD_ERASE_64K && !(flags & SECT_4K)) {
index bbc08f6657d69edc72497a37e96940e5fd53464b..70ea4b0ce1eb60cc6e0a9b7ba8093a2a8f1f7042 100644 (file)
@@ -125,7 +125,7 @@ struct spi_flash_info {
         * necessarily called a "sector" by the vendor.
         */
        u32             sector_size;
-       u32             nr_sectors;
+       u32             n_sectors;
 
        u16             page_size;
 
index 7fcc3bc3decf092c2e61bbddc98d12986ffaf28b..d46a27654c2b3256c57656857998d2138126cfbc 100644 (file)
@@ -23,7 +23,7 @@
                        },                                              \
                .id_len = (!(_jedec_id) ? 0 : (3 + ((_ext_id) ? 2 : 0))),       \
                .sector_size = (_sector_size),                          \
-               .nr_sectors = (_n_sectors),                             \
+               .n_sectors = (_n_sectors),                              \
                .page_size = 256,                                       \
                .flags = (_flags),
 
index 220c9616076ea83f717a17c270ee50ef451273c3..f7634df8028b9ff8619beb1f171ae55df3b2c42e 100644 (file)
@@ -1144,7 +1144,7 @@ int spi_flash_scan(struct spi_flash *flash)
        }
        flash->page_size <<= flash->shift;
        flash->sector_size = info->sector_size << flash->shift;
-       flash->size = flash->sector_size * info->nr_sectors << flash->shift;
+       flash->size = flash->sector_size * info->n_sectors << flash->shift;
 #ifdef CONFIG_SF_DUAL_FLASH
        if (flash->dual_flash & SF_DUAL_STACKED_FLASH)
                flash->size <<= 1;