diff mbox

[U-Boot,v2,15/22] sf: nr_sectors -> n_sectors

Message ID 1470773317-14314-6-git-send-email-jteki@openedev.com
State Superseded
Delegated to: Jagannadha Sutradharudu Teki
Headers show

Commit Message

Jagan Teki Aug. 9, 2016, 8:08 p.m. UTC
Rename nr_sectors as n_sectors to sync with Linux.

Cc: Simon Glass <sjg@chromium.org>
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>
Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Jagan Teki <jteki@openedev.com>
---
 drivers/mtd/spi/sf_internal.h | 2 +-
 drivers/mtd/spi/sf_params.c   | 2 +-
 drivers/mtd/spi/spi_flash.c   | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
diff mbox

Patch

diff --git a/drivers/mtd/spi/sf_internal.h b/drivers/mtd/spi/sf_internal.h
index 41e48e7..74f33a3 100644
--- a/drivers/mtd/spi/sf_internal.h
+++ b/drivers/mtd/spi/sf_internal.h
@@ -124,7 +124,7 @@  struct spi_flash_info {
 	 * necessarily called a "sector" by the vendor.
 	 */
 	u32		sector_size;
-	u32		nr_sectors;
+	u32		n_sectors;
 
 	u16		page_size;
 
diff --git a/drivers/mtd/spi/sf_params.c b/drivers/mtd/spi/sf_params.c
index 7314455..8a2a6b2 100644
--- a/drivers/mtd/spi/sf_params.c
+++ b/drivers/mtd/spi/sf_params.c
@@ -19,7 +19,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),
 
diff --git a/drivers/mtd/spi/spi_flash.c b/drivers/mtd/spi/spi_flash.c
index 1d63517..cf49045 100644
--- a/drivers/mtd/spi/spi_flash.c
+++ b/drivers/mtd/spi/spi_flash.c
@@ -1143,7 +1143,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;