diff options
author | Paul Brook <paul@codesourcery.com> | 2009-05-10 01:44:56 +0100 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-05-10 01:44:56 +0100 |
commit | bc24a225af2464dc30f88d6f930779cbf0e22b67 (patch) | |
tree | 6df682b479f89863159f836e1dc292623ab577e1 /hw/ide.c | |
parent | d4ec5228821b8bdd8019cb5dafa2ea3659ddb1f9 (diff) | |
download | qemu-bc24a225af2464dc30f88d6f930779cbf0e22b67.zip qemu-bc24a225af2464dc30f88d6f930779cbf0e22b67.tar.gz qemu-bc24a225af2464dc30f88d6f930779cbf0e22b67.tar.bz2 |
Follow coding conventions
Remove explicit struct qualifiers and rename structure types.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/ide.c')
-rw-r--r-- | hw/ide.c | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -3859,9 +3859,9 @@ void mmio_ide_init (target_phys_addr_t membase, target_phys_addr_t membase2, #define METADATA_SIZE 0x20 /* DSCM-1XXXX Microdrive hard disk with CF+ II / PCMCIA interface. */ -struct md_s { +typedef struct { IDEState ide[2]; - struct pcmcia_card_s card; + PCMCIACardState card; uint32_t attr_base; uint32_t io_base; @@ -3873,7 +3873,7 @@ struct md_s { uint8_t ctrl; uint16_t io; int cycle; -}; +} MicroDriveState; /* Register bitfields */ enum md_opt { @@ -3902,7 +3902,7 @@ enum md_ctrl { CTRL_SRST = 0x04, }; -static inline void md_interrupt_update(struct md_s *s) +static inline void md_interrupt_update(MicroDriveState *s) { if (!s->card.slot) return; @@ -3915,7 +3915,7 @@ static inline void md_interrupt_update(struct md_s *s) static void md_set_irq(void *opaque, int irq, int level) { - struct md_s *s = (struct md_s *) opaque; + MicroDriveState *s = (MicroDriveState *) opaque; if (level) s->stat |= STAT_INT; else @@ -3924,7 +3924,7 @@ static void md_set_irq(void *opaque, int irq, int level) md_interrupt_update(s); } -static void md_reset(struct md_s *s) +static void md_reset(MicroDriveState *s) { s->opt = OPT_MODE_MMAP; s->stat = 0; @@ -3936,7 +3936,7 @@ static void md_reset(struct md_s *s) static uint8_t md_attr_read(void *opaque, uint32_t at) { - struct md_s *s = (struct md_s *) opaque; + MicroDriveState *s = (MicroDriveState *) opaque; if (at < s->attr_base) { if (at < s->card.cis_len) return s->card.cis[at]; @@ -3969,7 +3969,7 @@ static uint8_t md_attr_read(void *opaque, uint32_t at) static void md_attr_write(void *opaque, uint32_t at, uint8_t value) { - struct md_s *s = (struct md_s *) opaque; + MicroDriveState *s = (MicroDriveState *) opaque; at -= s->attr_base; switch (at) { @@ -4000,7 +4000,7 @@ static void md_attr_write(void *opaque, uint32_t at, uint8_t value) static uint16_t md_common_read(void *opaque, uint32_t at) { - struct md_s *s = (struct md_s *) opaque; + MicroDriveState *s = (MicroDriveState *) opaque; uint16_t ret; at -= s->io_base; @@ -4059,7 +4059,7 @@ static uint16_t md_common_read(void *opaque, uint32_t at) static void md_common_write(void *opaque, uint32_t at, uint16_t value) { - struct md_s *s = (struct md_s *) opaque; + MicroDriveState *s = (MicroDriveState *) opaque; at -= s->io_base; switch (s->opt & OPT_MODE) { @@ -4120,7 +4120,7 @@ static void md_common_write(void *opaque, uint32_t at, uint16_t value) static void md_save(QEMUFile *f, void *opaque) { - struct md_s *s = (struct md_s *) opaque; + MicroDriveState *s = (MicroDriveState *) opaque; int i; uint8_t drive1_selected; @@ -4142,7 +4142,7 @@ static void md_save(QEMUFile *f, void *opaque) static int md_load(QEMUFile *f, void *opaque, int version_id) { - struct md_s *s = (struct md_s *) opaque; + MicroDriveState *s = (MicroDriveState *) opaque; int i; uint8_t drive1_selected; @@ -4351,7 +4351,7 @@ static const uint8_t dscm1xxxx_cis[0x14a] = { static int dscm1xxxx_attach(void *opaque) { - struct md_s *md = (struct md_s *) opaque; + MicroDriveState *md = (MicroDriveState *) opaque; md->card.attr_read = md_attr_read; md->card.attr_write = md_attr_write; md->card.common_read = md_common_read; @@ -4371,14 +4371,14 @@ static int dscm1xxxx_attach(void *opaque) static int dscm1xxxx_detach(void *opaque) { - struct md_s *md = (struct md_s *) opaque; + MicroDriveState *md = (MicroDriveState *) opaque; md_reset(md); return 0; } -struct pcmcia_card_s *dscm1xxxx_init(BlockDriverState *bdrv) +PCMCIACardState *dscm1xxxx_init(BlockDriverState *bdrv) { - struct md_s *md = (struct md_s *) qemu_mallocz(sizeof(struct md_s)); + MicroDriveState *md = (MicroDriveState *) qemu_mallocz(sizeof(MicroDriveState)); md->card.state = md; md->card.attach = dscm1xxxx_attach; md->card.detach = dscm1xxxx_detach; |