]> git.sur5r.net Git - u-boot/commitdiff
board/esd/cpci750/ide.c: fix compile warning
authorWolfgang Denk <wd@denx.de>
Fri, 11 Sep 2009 09:15:31 +0000 (11:15 +0200)
committerWolfgang Denk <wd@denx.de>
Mon, 14 Sep 2009 22:13:15 +0000 (00:13 +0200)
Fix warning: ide.c:54: warning: dereferencing type-punned pointer will
break strict-aliasing rules

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Matthias Fuchs <matthias.fuchs@esd-electronics.com>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
board/esd/cpci750/ide.c

index 638219f65ecac248e85a1f6d292b3f7d1522592a..a3bd1b73d5801e75755a36dfd50c0a90e84bf9ee 100644 (file)
@@ -48,14 +48,18 @@ int ide_preinit (void)
        if (devbusfn == -1)
                devbusfn = pci_find_device (0x1095, 0x3114, 0);
        if (devbusfn != -1) {
+               ulong *ide_bus_offset_ptr;
+
                status = 0;
 
+               ide_bus_offset_ptr = &ide_bus_offset[0];
                pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_0,
-                                      (u32 *) & ide_bus_offset[0]);
+                                      (u32 *)ide_bus_offset_ptr);
                ide_bus_offset[0] &= 0xfffffffe;
                ide_bus_offset[0] += CONFIG_SYS_PCI0_IO_SPACE;
+               ide_bus_offset_ptr = &ide_bus_offset[1];
                pci_read_config_dword (devbusfn, PCI_BASE_ADDRESS_2,
-                                      (u32 *) & ide_bus_offset[1]);
+                                      (u32 *)ide_bus_offset_ptr);
                ide_bus_offset[1] &= 0xfffffffe;
                ide_bus_offset[1] += CONFIG_SYS_PCI0_IO_SPACE;
        }