]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/net/irda/nsc-ircc.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-2.6-omap-h63xx.git] / drivers / net / irda / nsc-ircc.c
index 29b5ccd29d0bbcca3a7d7e78cf352da4848a9d3a..a7714da7c283c84d48082b34540fbb05f86f85d2 100644 (file)
@@ -20,7 +20,7 @@
  *     published by the Free Software Foundation; either version 2 of 
  *     the License, or (at your option) any later version.
  *  
- *     Neither Dag Brattli nor University of Tromsø admit liability nor
+ *     Neither Dag Brattli nor University of Tromsø admit liability nor
  *     provide warranty for any of this software. This material is 
  *     provided "AS-IS" and at no charge.
  *
@@ -100,7 +100,9 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info);
 static int nsc_ircc_init_108(nsc_chip_t *chip, chipio_t *info);
 static int nsc_ircc_init_338(nsc_chip_t *chip, chipio_t *info);
 static int nsc_ircc_init_39x(nsc_chip_t *chip, chipio_t *info);
+#ifdef CONFIG_PNP
 static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *id);
+#endif
 
 /* These are the known NSC chips */
 static nsc_chip_t chips[] = {
@@ -156,9 +158,11 @@ static const struct pnp_device_id nsc_ircc_pnp_table[] = {
 MODULE_DEVICE_TABLE(pnp, nsc_ircc_pnp_table);
 
 static struct pnp_driver nsc_ircc_pnp_driver = {
+#ifdef CONFIG_PNP
        .name = "nsc-ircc",
        .id_table = nsc_ircc_pnp_table,
        .probe = nsc_ircc_pnp_probe,
+#endif
 };
 
 /* Some prototypes */
@@ -437,7 +441,6 @@ static int __init nsc_ircc_open(chipio_t *info)
        self->tx_fifo.tail = self->tx_buff.head;
 
        /* Override the network functions we need to use */
-       SET_MODULE_OWNER(dev);
        dev->hard_start_xmit = nsc_ircc_hard_xmit_sir;
        dev->open            = nsc_ircc_net_open;
        dev->stop            = nsc_ircc_net_close;
@@ -917,6 +920,7 @@ static int nsc_ircc_probe_39x(nsc_chip_t *chip, chipio_t *info)
        return 0;
 }
 
+#ifdef CONFIG_PNP
 /* PNP probing */
 static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *id)
 {
@@ -953,6 +957,7 @@ static int nsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *i
 
        return 0;
 }
+#endif
 
 /*
  * Function nsc_ircc_setup (info)
@@ -1466,9 +1471,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 +1873,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 +1889,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;