]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/irda/nsc-ircc.c
Pull percpu-dtc into release branch
[linux-2.6-omap-h63xx.git] / drivers / net / irda / nsc-ircc.c
index cb62f2a9676aeb7d46395c162aed054939f93de5..d96c89751a719b9d3fc791b3ed2def107d3cb578 100644 (file)
@@ -110,7 +110,7 @@ static nsc_chip_t chips[] = {
        { "PC87338", { 0x398, 0x15c, 0x2e }, 0x08, 0xb0, 0xf8, 
          nsc_ircc_probe_338, nsc_ircc_init_338 },
        /* Contributed by Steffen Pingel - IBM X40 */
-       { "PC8738x", { 0x164e, 0x4e, 0x0 }, 0x20, 0xf4, 0xff,
+       { "PC8738x", { 0x164e, 0x4e, 0x2e }, 0x20, 0xf4, 0xff,
          nsc_ircc_probe_39x, nsc_ircc_init_39x },
        /* Contributed by Jan Frey - IBM A30/A31 */
        { "PC8739x", { 0x2e, 0x4e, 0x0 }, 0x20, 0xea, 0xff, 
@@ -1466,9 +1466,8 @@ static int nsc_ircc_hard_xmit_fir(struct sk_buff *skb, struct net_device *dev)
 
        self->stats.tx_bytes += skb->len;
 
-       memcpy(self->tx_fifo.queue[self->tx_fifo.free].start, skb->data, 
-              skb->len);
-       
+       skb_copy_from_linear_data(skb, self->tx_fifo.queue[self->tx_fifo.free].start,
+                     skb->len);
        self->tx_fifo.len++;
        self->tx_fifo.free++;
 
@@ -1869,10 +1868,14 @@ static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase)
                        /* Copy frame without CRC */
                        if (self->io.speed < 4000000) {
                                skb_put(skb, len-2);
-                               memcpy(skb->data, self->rx_buff.data, len-2);
+                               skb_copy_to_linear_data(skb,
+                                                       self->rx_buff.data,
+                                                       len - 2);
                        } else {
                                skb_put(skb, len-4);
-                               memcpy(skb->data, self->rx_buff.data, len-4);
+                               skb_copy_to_linear_data(skb,
+                                                       self->rx_buff.data,
+                                                       len - 4);
                        }
 
                        /* Move to next frame */
@@ -1881,7 +1884,7 @@ static int nsc_ircc_dma_receive_complete(struct nsc_ircc_cb *self, int iobase)
                        self->stats.rx_packets++;
 
                        skb->dev = self->netdev;
-                       skb->mac.raw  = skb->data;
+                       skb_reset_mac_header(skb);
                        skb->protocol = htons(ETH_P_IRDA);
                        netif_rx(skb);
                        self->netdev->last_rx = jiffies;
@@ -2066,20 +2069,14 @@ static void nsc_ircc_fir_interrupt(struct nsc_ircc_cb *self, int iobase,
  *    An interrupt from the chip has arrived. Time to do some work
  *
  */
-static irqreturn_t nsc_ircc_interrupt(int irq, void *dev_id,
-                               struct pt_regs *regs)
+static irqreturn_t nsc_ircc_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        struct nsc_ircc_cb *self;
        __u8 bsr, eir;
        int iobase;
 
-       if (!dev) {
-               IRDA_WARNING("%s: irq %d for unknown device.\n",
-                            driver_name, irq);
-               return IRQ_NONE;
-       }
-       self = (struct nsc_ircc_cb *) dev->priv;
+       self = dev->priv;
 
        spin_lock(&self->lock);