[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 7/8] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h
From: |
BALATON Zoltan |
Subject: |
[PATCH v3 7/8] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h |
Date: |
Tue, 17 Mar 2020 16:05:37 +0100 |
We can move this define now that less files use it to internal.h to
further reduce dependency on hw/ide.h.
Signed-off-by: BALATON Zoltan <address@hidden>
Reviewed-by: Mark Cave-Ayland <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
---
hw/mips/mips_r4k.c | 1 +
include/hw/ide.h | 2 --
include/hw/ide/internal.h | 2 ++
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
index ad8b75e286..3487013a4a 100644
--- a/hw/mips/mips_r4k.c
+++ b/hw/mips/mips_r4k.c
@@ -26,6 +26,7 @@
#include "qemu/log.h"
#include "hw/mips/bios.h"
#include "hw/ide.h"
+#include "hw/ide/internal.h"
#include "hw/loader.h"
#include "elf.h"
#include "hw/rtc/mc146818rtc.h"
diff --git a/include/hw/ide.h b/include/hw/ide.h
index d52c211f32..c5ce5da4f4 100644
--- a/include/hw/ide.h
+++ b/include/hw/ide.h
@@ -4,8 +4,6 @@
#include "hw/isa/isa.h"
#include "exec/memory.h"
-#define MAX_IDE_DEVS 2
-
/* ide-isa.c */
ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
DriveInfo *hd0, DriveInfo *hd1);
diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h
index 1bc1fc73e5..55da35d768 100644
--- a/include/hw/ide/internal.h
+++ b/include/hw/ide/internal.h
@@ -27,6 +27,8 @@ typedef struct IDEDMAOps IDEDMAOps;
#define TYPE_IDE_BUS "IDE"
#define IDE_BUS(obj) OBJECT_CHECK(IDEBus, (obj), TYPE_IDE_BUS)
+#define MAX_IDE_DEVS 2
+
/* Bits of HD_STATUS */
#define ERR_STAT 0x01
#define INDEX_STAT 0x02
--
2.21.1
- [PATCH v3 0/8] Misc hw/ide legacy clean up, BALATON Zoltan, 2020/03/17
- [PATCH v3 4/8] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h, BALATON Zoltan, 2020/03/17
- [PATCH v3 5/8] hw/ide/pci.c: Coding style update to fix checkpatch errors, BALATON Zoltan, 2020/03/17
- [PATCH v3 2/8] hw/isa/piix4.c: Introduce variable to store devfn, BALATON Zoltan, 2020/03/17
- [PATCH v3 7/8] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h,
BALATON Zoltan <=
- [PATCH v3 3/8] hw/ide: Get rid of piix4_init function, BALATON Zoltan, 2020/03/17
- [PATCH v3 1/8] hw/ide: Get rid of piix3_init functions, BALATON Zoltan, 2020/03/17
- [PATCH v3 8/8] hw/ide: Remove unneeded inclusion of hw/ide.h, BALATON Zoltan, 2020/03/17
- [PATCH v3 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs(), BALATON Zoltan, 2020/03/17
- Re: [PATCH v3 0/8] Misc hw/ide legacy clean up, John Snow, 2020/03/17
- Re: [PATCH v3 0/8] Misc hw/ide legacy clean up, John Snow, 2020/03/17