diff mbox

[08/24] tusb6010: move declarations to new file tusb6010.h

Message ID 1312823229-12822-9-git-send-email-avi@redhat.com
State New
Headers show

Commit Message

Avi Kivity Aug. 8, 2011, 5:06 p.m. UTC
Avoid #include hell.

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 hw/devices.h  |    7 -------
 hw/nseries.c  |    1 +
 hw/tusb6010.c |    2 +-
 hw/tusb6010.h |   10 ++++++++++
 4 files changed, 12 insertions(+), 8 deletions(-)
 create mode 100644 hw/tusb6010.h

Comments

Peter Maydell Aug. 9, 2011, 7:51 a.m. UTC | #1
On 8 August 2011 18:06, Avi Kivity <avi@redhat.com> wrote:
> diff --git a/hw/tusb6010.h b/hw/tusb6010.h
> new file mode 100644
> index 0000000..6faa94d
> --- /dev/null
> +++ b/hw/tusb6010.h
> @@ -0,0 +1,10 @@
> +#ifndef TUSB6010_H
> +#define TUSB6010_H
> +
> +typedef struct TUSBState TUSBState;
> +TUSBState *tusb6010_init(qemu_irq intr);
> +int tusb6010_sync_io(TUSBState *s);
> +int tusb6010_async_io(TUSBState *s);
> +void tusb6010_power(TUSBState *s, int on);
> +
> +#endif

New files should have a copyright/license boilerplate comment.

-- PMM
diff mbox

Patch

diff --git a/hw/devices.h b/hw/devices.h
index c788373..07fda83 100644
--- a/hw/devices.h
+++ b/hw/devices.h
@@ -47,13 +47,6 @@  void *tahvo_init(qemu_irq irq, int betty);
 
 void retu_key_event(void *retu, int state);
 
-/* tusb6010.c */
-typedef struct TUSBState TUSBState;
-TUSBState *tusb6010_init(qemu_irq intr);
-int tusb6010_sync_io(TUSBState *s);
-int tusb6010_async_io(TUSBState *s);
-void tusb6010_power(TUSBState *s, int on);
-
 /* tc6393xb.c */
 typedef struct TC6393xbState TC6393xbState;
 #define TC6393XB_RAM	0x110000 /* amount of ram for Video and USB */
diff --git a/hw/nseries.c b/hw/nseries.c
index 6a5575e..5521f28 100644
--- a/hw/nseries.c
+++ b/hw/nseries.c
@@ -32,6 +32,7 @@ 
 #include "bt.h"
 #include "loader.h"
 #include "blockdev.h"
+#include "tusb6010.h"
 
 /* Nokia N8x0 support */
 struct n800_s {
diff --git a/hw/tusb6010.c b/hw/tusb6010.c
index ccd01ad..add748c 100644
--- a/hw/tusb6010.c
+++ b/hw/tusb6010.c
@@ -23,7 +23,7 @@ 
 #include "usb.h"
 #include "omap.h"
 #include "irq.h"
-#include "devices.h"
+#include "tusb6010.h"
 
 struct TUSBState {
     int iomemtype[2];
diff --git a/hw/tusb6010.h b/hw/tusb6010.h
new file mode 100644
index 0000000..6faa94d
--- /dev/null
+++ b/hw/tusb6010.h
@@ -0,0 +1,10 @@ 
+#ifndef TUSB6010_H
+#define TUSB6010_H
+
+typedef struct TUSBState TUSBState;
+TUSBState *tusb6010_init(qemu_irq intr);
+int tusb6010_sync_io(TUSBState *s);
+int tusb6010_async_io(TUSBState *s);
+void tusb6010_power(TUSBState *s, int on);
+
+#endif