diff options
author | Paul Brook <paul@codesourcery.com> | 2009-05-12 15:38:55 +0100 |
---|---|---|
committer | Paul Brook <paul@codesourcery.com> | 2009-05-12 15:39:52 +0100 |
commit | d3151521ab5da56bddfb1733baaf7ed4976e1c76 (patch) | |
tree | 6586546c7996e3ced3a7c78193531333bd68692d /hw/tosa.c | |
parent | f3bc52385cacca63565d453ff4a63856f7686bce (diff) | |
download | qemu-d3151521ab5da56bddfb1733baaf7ed4976e1c76.zip qemu-d3151521ab5da56bddfb1733baaf7ed4976e1c76.tar.gz qemu-d3151521ab5da56bddfb1733baaf7ed4976e1c76.tar.bz2 |
Follow coding conventions.
More structure renaming.
Signed-off-by: Paul Brook <paul@codesourcery.com>
Diffstat (limited to 'hw/tosa.c')
-rw-r--r-- | hw/tosa.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -124,15 +124,15 @@ static void tosa_ssp_write(void *opaque, uint32_t value) fprintf(stderr, "TG: %d %02x\n", value >> 5, value & 0x1f); } -struct tosa_dac_i2c { +typedef struct { i2c_slave i2c; int len; char buf[3]; -}; +} TosaDACState; static int tosa_dac_send(i2c_slave *i2c, uint8_t data) { - struct tosa_dac_i2c *s = (struct tosa_dac_i2c *)i2c; + TosaDACState *s = (TosaDACState *)i2c; s->buf[s->len] = data; if (s->len ++ > 2) { #ifdef VERBOSE @@ -151,7 +151,7 @@ static int tosa_dac_send(i2c_slave *i2c, uint8_t data) static void tosa_dac_event(i2c_slave *i2c, enum i2c_event event) { - struct tosa_dac_i2c *s = (struct tosa_dac_i2c *)i2c; + TosaDACState *s = (TosaDACState *)i2c; s->len = 0; switch (event) { case I2C_START_SEND: @@ -180,8 +180,8 @@ static int tosa_dac_recv(i2c_slave *s) static void tosa_tg_init(PXA2xxState *cpu) { - struct i2c_bus *bus = pxa2xx_i2c_bus(cpu->i2c[0]); - struct i2c_slave *dac = i2c_slave_init(bus, 0, sizeof(struct tosa_dac_i2c)); + i2c_bus *bus = pxa2xx_i2c_bus(cpu->i2c[0]); + i2c_slave *dac = i2c_slave_init(bus, 0, sizeof(TosaDACState)); dac->send = tosa_dac_send; dac->event = tosa_dac_event; dac->recv = tosa_dac_recv; |