[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 04/13] pflash: make TYPE_CFI_PFLASH0{1, 2} macros pu
From: |
Efimov Vasily |
Subject: |
[Qemu-devel] [PATCH 04/13] pflash: make TYPE_CFI_PFLASH0{1, 2} macros public |
Date: |
Fri, 17 Jun 2016 16:11:00 +0300 |
qdev API can be used to create CFI pflash devices despite existance of helper
functions. The type name is needed in course of such creation. Using the
preprocessor alias instead of the string literal itself is preferable.
The patch makes the aliases accessible through the header.
Signed-off-by: Efimov Vasily <address@hidden>
---
hw/block/pflash_cfi01.c | 1 -
hw/block/pflash_cfi02.c | 1 -
include/hw/block/flash.h | 3 +++
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
index 31585e3..62d7a56 100644
--- a/hw/block/pflash_cfi01.c
+++ b/hw/block/pflash_cfi01.c
@@ -65,7 +65,6 @@ do { \
#define DPRINTF(fmt, ...) do { } while (0)
#endif
-#define TYPE_CFI_PFLASH01 "cfi.pflash01"
#define CFI_PFLASH01(obj) OBJECT_CHECK(pflash_t, (obj), TYPE_CFI_PFLASH01)
#define PFLASH_BE 0
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
index 5f10610..4f6105c 100644
--- a/hw/block/pflash_cfi02.c
+++ b/hw/block/pflash_cfi02.c
@@ -57,7 +57,6 @@ do { \
#define PFLASH_LAZY_ROMD_THRESHOLD 42
-#define TYPE_CFI_PFLASH02 "cfi.pflash02"
#define CFI_PFLASH02(obj) OBJECT_CHECK(pflash_t, (obj), TYPE_CFI_PFLASH02)
struct pflash_t {
diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h
index 50ccbbc..a088baa 100644
--- a/include/hw/block/flash.h
+++ b/include/hw/block/flash.h
@@ -5,6 +5,9 @@
#include "exec/memory.h"
+#define TYPE_CFI_PFLASH01 "cfi.pflash01"
+#define TYPE_CFI_PFLASH02 "cfi.pflash02"
+
typedef struct pflash_t pflash_t;
/* pflash_cfi01.c */
--
2.7.4
- [Qemu-devel] [PATCH 00/13] Make Q35 devices closer to Qemu object model., Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 03/13] vmport: identify vmport type by macro TYPE_VMPORT, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 10/13] ICH9 LPC: handle PIC and I/O APIC IRQs as qdev GPIO, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 05/13] Q35: implement property interfece to several parameters, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 09/13] ICH9 SMB: make TYPE_ICH9_SMB_DEVICE macro public, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 04/13] pflash: make TYPE_CFI_PFLASH0{1, 2} macros public,
Efimov Vasily <=
- [Qemu-devel] [PATCH 02/13] pcspk: convert "pit" property type from ptr to link, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 01/13] ide: move headers to include folder, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 06/13] pc_q35: configure Q35 instance using properties, Efimov Vasily, 2016/06/17
- [Qemu-devel] [PATCH 13/13] ICH9 LPC: configure PCI IRQs routing internally, Efimov Vasily, 2016/06/17