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

Skip to content
Commit 8bb8b85f authored by Marek Vasut's avatar Marek Vasut Committed by David Woodhouse
Browse files

mtd: m25p80: Fix the Spansion chip detection



Due to the implementation of the following loop at the end
of jedec_probe():

776         for (tmp = 0; tmp < ARRAY_SIZE(m25p_ids) - 1; tmp++) {
777                 info = (void *)m25p_ids[tmp].driver_data;
778                 if (info->jedec_id == jedec) {
779                         if (info->ext_id != 0 && info->ext_id != ext_jedec)
780                                 continue;
781                         return &m25p_ids[tmp];
782                 }
783         }

In particular line 779 in the above numbering, the chips with ext_id != 0 must
be ordered first in the list of chips (m25p_ids[]).

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent f728598f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment