Merge tag 'cfi/for-5.8' of gitolite.kernel.org:pub/scm/linux/kernel/git/mtd/linux into mtd/next
CFI changes: * Support the absence of protection registers for Intel CFI flashes * Replace zero-length array with flexible-arrays
This commit is contained in:
@@ -420,8 +420,9 @@ read_pri_intelext(struct map_info *map, __u16 adr)
|
||||
extra_size = 0;
|
||||
|
||||
/* Protection Register info */
|
||||
extra_size += (extp->NumProtectionFields - 1) *
|
||||
sizeof(struct cfi_intelext_otpinfo);
|
||||
if (extp->NumProtectionFields)
|
||||
extra_size += (extp->NumProtectionFields - 1) *
|
||||
sizeof(struct cfi_intelext_otpinfo);
|
||||
}
|
||||
|
||||
if (extp->MinorVersion >= '1') {
|
||||
@@ -695,14 +696,16 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd,
|
||||
*/
|
||||
if (extp && extp->MajorVersion == '1' && extp->MinorVersion >= '3'
|
||||
&& extp->FeatureSupport & (1 << 9)) {
|
||||
int offs = 0;
|
||||
struct cfi_private *newcfi;
|
||||
struct flchip *chip;
|
||||
struct flchip_shared *shared;
|
||||
int offs, numregions, numparts, partshift, numvirtchips, i, j;
|
||||
int numregions, numparts, partshift, numvirtchips, i, j;
|
||||
|
||||
/* Protection Register info */
|
||||
offs = (extp->NumProtectionFields - 1) *
|
||||
sizeof(struct cfi_intelext_otpinfo);
|
||||
if (extp->NumProtectionFields)
|
||||
offs = (extp->NumProtectionFields - 1) *
|
||||
sizeof(struct cfi_intelext_otpinfo);
|
||||
|
||||
/* Burst Read info */
|
||||
offs += extp->extra[offs+1]+2;
|
||||
|
Fai riferimento in un nuovo problema
Block a user