diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-03-08 10:46:00 +0100 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-03-11 22:53:44 +0100 |
commit | 81c7db723ebd0c677784a728020c7e8845868daf (patch) | |
tree | 3094bc659ad728fb889bcbe308244771dec573a4 /hw/block/pflash_cfi01.c | |
parent | e7b6274197c5f096860014ca750544d6aca0b9b9 (diff) |
hw: Use PFLASH_CFI0{1,2} and TYPE_PFLASH_CFI0{1,2}
We have two open-coded copies of macro PFLASH_CFI01(). Move the macro
to the header, so we can ditch the copies. Move PFLASH_CFI02() to the
header for symmetry.
We define macros TYPE_PFLASH_CFI01 and TYPE_PFLASH_CFI02 for type name
strings, then mostly use the strings. If the macros are worth
defining, they are worth using. Replace the strings by the macros.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-Id: <20190308094610.21210-6-armbru@redhat.com>
Diffstat (limited to 'hw/block/pflash_cfi01.c')
-rw-r--r-- | hw/block/pflash_cfi01.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index f75f0a6998..1c99aa6e4a 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -59,9 +59,6 @@ do { \ #define DPRINTF(fmt, ...) do { } while (0) #endif -#define PFLASH_CFI01(obj) \ - OBJECT_CHECK(PFlashCFI01, (obj), TYPE_PFLASH_CFI01) - #define PFLASH_BE 0 #define PFLASH_SECURE 1 |