vserver 1.9.5.x5
[linux-2.6.git] / arch / mips / pci / ops-au1000.c
index b921cc6..c1c91ca 100644 (file)
@@ -288,10 +288,18 @@ static int config_read(struct pci_bus *bus, unsigned int devfn,
                       int where, int size, u32 * val)
 {
        switch (size) {
-       case 1:
-               return read_config_byte(bus, devfn, where, (u8 *) val);
-       case 2:
-               return read_config_word(bus, devfn, where, (u16 *) val);
+       case 1: {
+                       u8 _val;
+                       int rc = read_config_byte(bus, devfn, where, &_val);
+                       *val = _val;
+                       return rc;
+               }
+       case 2: {
+                       u16 _val;
+                       int rc = read_config_word(bus, devfn, where, &_val);
+                       *val = _val;
+                       return rc;
+               }
        default:
                return read_config_dword(bus, devfn, where, val);
        }