diff options
author | Cyril Bur <cyril.bur@au1.ibm.com> | 2015-08-26 16:02:34 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2015-08-28 15:24:04 +1000 |
commit | 55c30aa53919fda1bd903630c4c92bca95cbd42d (patch) | |
tree | 865d63360c7103c7d9213dabc44bbc0f32d275d8 /external/common | |
parent | aa0f5f4cb904faeff3ae53e35d16e5e12191de4e (diff) | |
download | blackbird-skiboot-55c30aa53919fda1bd903630c4c92bca95cbd42d.tar.gz blackbird-skiboot-55c30aa53919fda1bd903630c4c92bca95cbd42d.zip |
libflash: Reintroduce typesafety in lowlevel libflash calls
Previous work did away with some typesafety when adding the
blocklevel_device abstraction, this has resulted in the ability to
accidently call libflash low level code with a blocklevel_device which has
not been initialised by the libflash backend.
The end result will not be good. Best to reintroduce that low level calls
be called with libflashes own structures.
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'external/common')
-rw-r--r-- | external/common/arch_flash_arm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/external/common/arch_flash_arm.c b/external/common/arch_flash_arm.c index 576c5e85..b3c94543 100644 --- a/external/common/arch_flash_arm.c +++ b/external/common/arch_flash_arm.c @@ -235,7 +235,7 @@ int arch_flash_erase_chip(struct blocklevel_device *bl) if (!arch_data.flash_chip) return -1; - return flash_erase_chip(bl); + return flash_erase_chip(arch_data.flash_chip); } int arch_flash_4b_mode(struct blocklevel_device *bl, int set_4b) @@ -247,7 +247,7 @@ int arch_flash_4b_mode(struct blocklevel_device *bl, int set_4b) if (!arch_data.flash_chip) return -1; - return flash_force_4b_mode(bl, set_4b); + return flash_force_4b_mode(arch_data.flash_chip, set_4b); } int arch_flash_set_wrprotect(struct blocklevel_device *bl, int set) |