]> err.no Git - linux-2.6/blobdiff - drivers/char/rio/riotable.c
sdio: add sdio_f0_readb() and sdio_f0_writeb()
[linux-2.6] / drivers / char / rio / riotable.c
index 364119e975b4e6b6a14f19594d558007210444ba..991119c9f473ef81a8f8691be7860b52af3bd38d 100644 (file)
@@ -546,11 +546,11 @@ int RIODeleteRta(struct rio_info *p, struct Map *MapP)
                                                                 ** accessed from the driver.
                                                                 */
                                                                Pkt = (struct PKT __iomem *) RIO_PTR(HostP->Caddr, readw(&*TxPktP));
-                                                               rio_dprintk(RIO_DEBUG_TABLE, "Tx packet (%x) destination: Old %x:%x New %x:%x\n", *TxPktP, Pkt->dest_unit, Pkt->dest_port, dest_unit, dest_port);
+                                                               rio_dprintk(RIO_DEBUG_TABLE, "Tx packet (%x) destination: Old %x:%x New %x:%x\n", readw(TxPktP), readb(&Pkt->dest_unit), readb(&Pkt->dest_port), dest_unit, dest_port);
                                                                writew(dest_unit, &Pkt->dest_unit);
                                                                writew(dest_port, &Pkt->dest_port);
                                                        }
-                                                       rio_dprintk(RIO_DEBUG_TABLE, "Port %d phb destination: Old %x:%x New %x:%x\n", port, PortP->PhbP->destination & 0xff, (PortP->PhbP->destination >> 8) & 0xff, dest_unit, dest_port);
+                                                       rio_dprintk(RIO_DEBUG_TABLE, "Port %d phb destination: Old %x:%x New %x:%x\n", port, readb(&PortP->PhbP->destination) & 0xff, (readb(&PortP->PhbP->destination) >> 8) & 0xff, dest_unit, dest_port);
                                                        writew(dest_unit + (dest_port << 8), &PortP->PhbP->destination);
                                                }
                                                rio_spin_unlock_irqrestore(&PortP->portSem, sem_flags);
@@ -863,8 +863,7 @@ int RIOReMapPorts(struct rio_info *p, struct Host *HostP, struct Map *HostMapP)
                if (PortP->TxRingBuffer)
                        memset(PortP->TxRingBuffer, 0, p->RIOBufferSize);
                else if (p->RIOBufferSize) {
-                       PortP->TxRingBuffer = kmalloc(p->RIOBufferSize, GFP_KERNEL);
-                       memset(PortP->TxRingBuffer, 0, p->RIOBufferSize);
+                       PortP->TxRingBuffer = kzalloc(p->RIOBufferSize, GFP_KERNEL);
                }
                PortP->TxBufferOut = 0;
                PortP->TxBufferIn = 0;