Skip to content
Commit 6f6b9fee authored by Alexander Sverdlin's avatar Alexander Sverdlin Committed by Brian Norris
Browse files

mtd: phram: Repair multiple instances support



Commit b2a2a84d (mtd: phram: dot not crash when
built-in and passing boot param) claims to be "based on Ville Herva's similar
patch to block2mtd" (c4e7fb31), but it has
missed the crucial point of the original path: all these "if(n)def MODULE".
It has broken the possibility to create several phram instances when phram is
compiled as module. The possibility to add instances via /sys writes to
/sys/module/phram/parameters/phram was also broken with mentioned patch.
Proposed patch takes the idea of original block2mtd patch to its full extent.
Assumption "This function is always called before 'init_phram()'" was also
incorrect, so removed the comment. This patch effectively reverts also
b11ec57f (mtd: phram: fix section mismatch for
phram_setup).

Signed-off-by: default avatarAlexander Sverdlin <alexander.sverdlin@nsn.com>
[Brian: remove static assigment = 0]
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
parent b4c23305
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment