summaryrefslogtreecommitdiff
path: root/drivers/mtd/spi-nor/micron-st.c
diff options
context:
space:
mode:
authorMichael Walle <mwalle@kernel.org>2023-09-08 13:16:31 +0300
committerTudor Ambarus <tudor.ambarus@linaro.org>2023-09-19 18:57:50 +0300
commit2d7f3a08875bc7045973fda487d6bf1ecb402e47 (patch)
treee9ede83c2e4b8780a0baf61e207ecd3d16574e44 /drivers/mtd/spi-nor/micron-st.c
parent95c6e3d26691d9144bfa3cdb95962bdb24d98905 (diff)
downloadlinux-2d7f3a08875bc7045973fda487d6bf1ecb402e47.tar.xz
mtd: spi-nor: move the .id and .id_len into an own structure
Create a new structure to hold a flash ID and its length. The goal is to have a new macro SNOR_ID() which can have a flexible id length. This way we can get rid of all the individual INFOx() macros. Signed-off-by: Michael Walle <mwalle@kernel.org> Link: https://lore.kernel.org/r/20230807-mtd-flash-info-db-rework-v3-13-e60548861b10@kernel.org Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Diffstat (limited to 'drivers/mtd/spi-nor/micron-st.c')
-rw-r--r--drivers/mtd/spi-nor/micron-st.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/spi-nor/micron-st.c b/drivers/mtd/spi-nor/micron-st.c
index 5406a3af2ce0..229c951efcce 100644
--- a/drivers/mtd/spi-nor/micron-st.c
+++ b/drivers/mtd/spi-nor/micron-st.c
@@ -78,7 +78,7 @@ static int micron_st_nor_octal_dtr_en(struct spi_nor *nor)
return ret;
}
- if (memcmp(buf, nor->info->id, nor->info->id_len))
+ if (memcmp(buf, nor->info->id->bytes, nor->info->id->len))
return -EINVAL;
return 0;
@@ -114,7 +114,7 @@ static int micron_st_nor_octal_dtr_dis(struct spi_nor *nor)
return ret;
}
- if (memcmp(buf, nor->info->id, nor->info->id_len))
+ if (memcmp(buf, nor->info->id->bytes, nor->info->id->len))
return -EINVAL;
return 0;