diff options
author | Anastasia Klimchuk <aklm@chromium.org> | 2021-08-03 14:08:02 +1000 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2021-08-17 16:30:46 +0000 |
commit | c845e64b4f20b024e17827fe79853e799f76d858 (patch) | |
tree | 85a84fe848434a0240b87c6c8d8516c50d5440f0 /programmer.h | |
parent | c87a770f5d7072122bc9d3c501a34905052daa7f (diff) | |
download | flashrom-c845e64b4f20b024e17827fe79853e799f76d858.tar.gz flashrom-c845e64b4f20b024e17827fe79853e799f76d858.tar.bz2 flashrom-c845e64b4f20b024e17827fe79853e799f76d858.zip |
opaque_master: Add shutdown function in opaque_master struct
With this, register_opaque_master can take care of register_shutdown
as well, and every opaque master only needs to call
register_opaque_master instead of calling both register_opaque_master
and register_shutdown.
Next patches in the chain convert opaque masters to use new API.
BUG=b:185191942
TEST=builds and ninja test from CB:56413
Change-Id: I34183e6bafc787eec54ee4a26b73a40803f3ce99
Signed-off-by: Anastasia Klimchuk <aklm@chromium.org>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/56823
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Diffstat (limited to 'programmer.h')
-rw-r--r-- | programmer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/programmer.h b/programmer.h index ec559872..3de87e58 100644 --- a/programmer.h +++ b/programmer.h @@ -443,6 +443,7 @@ struct opaque_master { int (*read) (struct flashctx *flash, uint8_t *buf, unsigned int start, unsigned int len); int (*write) (struct flashctx *flash, const uint8_t *buf, unsigned int start, unsigned int len); int (*erase) (struct flashctx *flash, unsigned int blockaddr, unsigned int blocklen); + int (*shutdown)(void *data); void *data; }; int register_opaque_master(const struct opaque_master *mst, void *data); |