Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 68aa352d authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse
Browse files

mtd: nand: rename the id field of 'struct nand_flash_dev'



The 'id' is a bit confusing name because NAND IDs are multi-byte. Re-name
it to 'dev_id' to make it clear that this is the "device ID" part (the second
byte).

While on it, clean-up the commentary for 'struct nand_flash_dev'.

Signed-off-by: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Acked-by: default avatarBrian Norris <computersforpeace@gmail.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 3239a6cd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -379,7 +379,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip)

	/* Print and store the manufacturer and ID codes. */
	for (i = 0; nand_flash_ids[i].name != NULL; i++) {
		if (id == nand_flash_ids[i].id) {
		if (id == nand_flash_ids[i].dev_id) {
			/* Try to identify manufacturer */
			for (j = 0; nand_manuf_ids[j].id != 0x0; j++) {
				if (nand_manuf_ids[j].id == mfr)
+1 −1
Original line number Diff line number Diff line
@@ -206,7 +206,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip)

	/* FIXME: to deal with multi-flash on multi-Millennium case more carefully */
	for (i = 0; nand_flash_ids[i].name != NULL; i++) {
		if ( id == nand_flash_ids[i].id) {
		if ( id == nand_flash_ids[i].dev_id) {
			/* Try to identify manufacturer */
			for (j = 0; nand_manuf_ids[j].id != 0x0; j++) {
				if (nand_manuf_ids[j].id == mfr)
+1 −1
Original line number Diff line number Diff line
@@ -314,7 +314,7 @@ static int DoC_IdentChip(struct DiskOnChip *doc, int floor, int chip)
		return 0;

	for (i = 0; nand_flash_ids[i].name != NULL; i++) {
		if (id == nand_flash_ids[i].id) {
		if (id == nand_flash_ids[i].dev_id) {
			/* Try to identify manufacturer */
			for (j = 0; nand_manuf_ids[j].id != 0x0; j++) {
				if (nand_manuf_ids[j].id == mfr)
+1 −1
Original line number Diff line number Diff line
@@ -3142,7 +3142,7 @@ static struct nand_flash_dev *nand_get_flash_type(struct mtd_info *mtd,
		type = nand_flash_ids;

	for (; type->name != NULL; type++)
		if (*dev_id == type->id)
		if (*dev_id == type->dev_id)
			break;

	chip->onfi_version = 0;
+3 −3
Original line number Diff line number Diff line
@@ -767,7 +767,7 @@ static int init_nandsim(struct mtd_info *mtd)

	/* Detect how many ID bytes the NAND chip outputs */
	for (i = 0; nand_flash_ids[i].name != NULL; i++) {
                if (second_id_byte != nand_flash_ids[i].id)
		if (second_id_byte != nand_flash_ids[i].dev_id)
			continue;
	}

Loading