include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit...
[safe/jmp/linux-2.6] / drivers / net / wan / pc300_drv.c
index 79dabc5..3f744c6 100644 (file)
@@ -228,6 +228,7 @@ static char rcsid[] =
 #include <linux/etherdevice.h>
 #include <linux/spinlock.h>
 #include <linux/if.h>
+#include <linux/slab.h>
 #include <net/arp.h>
 
 #include <asm/io.h>
@@ -251,7 +252,7 @@ static char rcsid[] =
 #undef PC300_DEBUG_RX
 #undef PC300_DEBUG_OTHER
 
-static struct pci_device_id cpc_pci_dev_id[] __devinitdata = {
+static DEFINE_PCI_DEVICE_TABLE(cpc_pci_dev_id) = {
        /* PC300/RSV or PC300/X21, 2 chan */
        {0x120e, 0x300, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0x300},
        /* PC300/RSV or PC300/X21, 1 chan */
@@ -514,8 +515,8 @@ static int dma_buf_read(pc300_t * card, int ch, struct sk_buff *skb)
                                  RX_BD_ADDR(ch, chan->rx_first_bd));
        while ((status = cpc_readb(&ptdescr->status)) & DST_OSB) {
                nchar = cpc_readw(&ptdescr->len);
-               if ((status & (DST_OVR | DST_CRC | DST_RBIT | DST_SHRT | DST_ABT))
-                   || (nchar > BD_DEF_LEN)) {
+               if ((status & (DST_OVR | DST_CRC | DST_RBIT | DST_SHRT | DST_ABT)) ||
+                   (nchar > BD_DEF_LEN)) {
 
                        if (nchar > BD_DEF_LEN)
                                status |= DST_RBIT;
@@ -1428,8 +1429,7 @@ static void falc_update_stats(pc300_t * card, int ch)
 
                if (((conf->media == IF_IFACE_T1) &&
                     (cpc_readb(falcbase + F_REG(FRS1, ch)) & FRS1_LLBAD) &&
-                    (!(cpc_readb(falcbase + F_REG(FRS1, ch)) & FRS1_PDEN)))
-                   ||
+                    (!(cpc_readb(falcbase + F_REG(FRS1, ch)) & FRS1_PDEN))) ||
                    ((conf->media == IF_IFACE_E1) &&
                     (cpc_readb(falcbase + F_REG(RSP, ch)) & RSP_LLBAD))) {
                        pfalc->prbs = 2;
@@ -2285,8 +2285,8 @@ static void falc_e1_intr(pc300_t * card, int ch)
                if (gis & GIS_ISR1) {
                        isr1 = cpc_readb(falcbase + F_REG(FISR1, ch));
                        if (isr1 & FISR1_XMB) {
-                               if ((pfalc->xmb_cause & 2)
-                                   && pfalc->multiframe_mode) {
+                               if ((pfalc->xmb_cause & 2) &&
+                                   pfalc->multiframe_mode) {
                                        if (cpc_readb (falcbase + F_REG(FRS0, ch)) & 
                                                                        (FRS0_LOS | FRS0_AIS | FRS0_LFA)) {
                                                cpc_writeb(falcbase + F_REG(XSP, ch),
@@ -2639,9 +2639,9 @@ static int cpc_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
                                                !(cpc_readb (scabase + M_REG(CTL, ch)) & CTL_DTR);
                                        /* There is no DSR in HD64572 */
                                }
-                               if (!arg
-                                   || copy_to_user(arg, &pc300status, sizeof(pc300status_t)))
-                                               return -EINVAL;
+                               if (!arg ||
+                                   copy_to_user(arg, &pc300status, sizeof(pc300status_t)))
+                                       return -EINVAL;
                                return 0;
                        }