Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion drivers/mtd/spiflash/spi020_nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ static int drv_nand_read_id(struct drv_nand_dev_info *info, uint32_t *id)
pr_debug("id = 0x%02x 0x%02x 0x%02x 0x%02x\n",
card_id[0], card_id[1], card_id[2], card_id[3]);

for (i = 0; i < sizeof(spinand_flash_ids); i++) {
for (i = 0; i < ARRAY_SIZE(spinand_flash_ids); i++) {
if ((card_id[0] == spinand_flash_ids[i].mfr_id) && \
(card_id[1] == spinand_flash_ids[i].dev_id)) {
id_count = spinand_flash_ids[i].id_len;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/spiflash/spinand.c
Original file line number Diff line number Diff line change
Expand Up @@ -839,7 +839,7 @@ static int drv_nand_read_id(struct drv_nand_dev_info *info, uint32_t *id)
pr_debug("id = 0x%02x 0x%02x 0x%02x 0x%02x\n",
card_id[0], card_id[1], card_id[2], card_id[3]);

for (i = 0; i < sizeof(spinand_flash_ids); i++) {
for (i = 0; i < ARRAY_SIZE(spinand_flash_ids); i++) {
if ((card_id[0] == spinand_flash_ids[i].mfr_id) && \
(card_id[1] == spinand_flash_ids[i].dev_id)) {
id_count = spinand_flash_ids[i].id_len;
Expand Down