]> xenbits.xensource.com Git - qemu-xen-4.2-testing.git/commitdiff
Use i2c_slave_init() to allocate the PXA (dummy) I2C slave.
authorbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 23 May 2007 22:21:27 +0000 (22:21 +0000)
committerbalrog <balrog@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 23 May 2007 22:21:27 +0000 (22:21 +0000)
Hush the warning:
hw/pc.c:402: warning: control reaches end of non-void function

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2856 c046a42c-6fe2-441c-8c8c-71466251a162

hw/pc.c
hw/pxa2xx.c

diff --git a/hw/pc.c b/hw/pc.c
index a698ba546be680348bc7c53afd8fd983520191f2..388d657294e1c701664f83015f482cf16d6fe7cd 100644 (file)
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -347,7 +347,7 @@ void bochs_bios_init(void)
 
 /* Generate an initial boot sector which sets state and jump to
    a specified vector */
-static int generate_bootsect(uint32_t gpr[8], uint16_t segs[6], uint16_t ip)
+static void generate_bootsect(uint32_t gpr[8], uint16_t segs[6], uint16_t ip)
 {
     uint8_t bootsect[512], *p;
     int i;
index 913c0bd76448cc0d322e1752f68ba2c87eb4075d..03f4b47316fece6009530ff0da274a7844e1c724 100644 (file)
@@ -1294,7 +1294,7 @@ struct pxa2xx_i2c_s *pxa2xx_i2c_init(target_phys_addr_t base,
 {
     int iomemtype;
     struct pxa2xx_i2c_s *s = (struct pxa2xx_i2c_s *)
-            qemu_mallocz(sizeof(struct pxa2xx_i2c_s));
+            i2c_slave_init(i2c_init_bus(), 0, sizeof(struct pxa2xx_i2c_s));
 
     s->base = base;
     s->irq = irq;