cris-build-fixes-update-eth_v10c-ethernet-driver-fix
[safe/jmp/linux-2.6] / drivers / net / irda / irport.c
index 3098960..c79caa5 100644 (file)
@@ -164,20 +164,17 @@ irport_open(int i, unsigned int iobase, unsigned int irq)
        
        /* Allocate memory if needed */
        if (self->tx_buff.truesize > 0) {
-               self->tx_buff.head = kmalloc(self->tx_buff.truesize,
+               self->tx_buff.head = kzalloc(self->tx_buff.truesize,
                                                      GFP_KERNEL);
                if (self->tx_buff.head == NULL) {
                        IRDA_ERROR("%s(), can't allocate memory for "
                                   "transmit buffer!\n", __FUNCTION__);
                        goto err_out4;
                }
-               memset(self->tx_buff.head, 0, self->tx_buff.truesize);
        }       
        self->tx_buff.data = self->tx_buff.head;
 
        self->netdev = dev;
-       /* Keep track of module usage */
-       SET_MODULE_OWNER(dev);
 
        /* May be overridden by piggyback drivers */
        self->interrupt    = irport_interrupt;
@@ -509,7 +506,7 @@ static void irport_timeout(struct net_device *dev)
        IRDA_DEBUG(0, "%s(), iir=%02x, lsr=%02x, iobase=%#x\n", 
                   __FUNCTION__, iir, lsr, iobase);
 
-       IRDA_DEBUG(0, "%s(), transmitting=%d, remain=%d, done=%d\n", 
+       IRDA_DEBUG(0, "%s(), transmitting=%d, remain=%d, done=%td\n",
                   __FUNCTION__, self->transmitting, self->tx_buff.len,
                   self->tx_buff.data - self->tx_buff.head);