summaryrefslogtreecommitdiff
path: root/drivers/staging/rt2860/2860_main_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/staging/rt2860/2860_main_dev.c')
-rw-r--r--drivers/staging/rt2860/2860_main_dev.c43
1 files changed, 3 insertions, 40 deletions
diff --git a/drivers/staging/rt2860/2860_main_dev.c b/drivers/staging/rt2860/2860_main_dev.c
index 08ca81f43cc8..e2f94809ca7f 100644
--- a/drivers/staging/rt2860/2860_main_dev.c
+++ b/drivers/staging/rt2860/2860_main_dev.c
@@ -90,12 +90,10 @@ void init_thread_task(PRTMP_ADAPTER pAd);
static void __exit rt2860_cleanup_module(void);
static int __init rt2860_init_module(void);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#ifdef CONFIG_PM
static int rt2860_suspend(struct pci_dev *pci_dev, pm_message_t state);
static int rt2860_resume(struct pci_dev *pci_dev);
#endif // CONFIG_PM //
-#endif
//
@@ -128,22 +126,15 @@ static struct pci_driver rt2860_driver =
name: "rt2860",
id_table: rt2860_pci_tbl,
probe: rt2860_init_one,
-#if LINUX_VERSION_CODE >= 0x20412
remove: __devexit_p(rt2860_remove_one),
-#else
- remove: __devexit(rt2860_remove_one),
-#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#ifdef CONFIG_PM
suspend: rt2860_suspend,
resume: rt2860_resume,
#endif
-#endif
};
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
#ifdef CONFIG_PM
VOID RT2860RejectPendingPackets(
@@ -284,16 +275,11 @@ static int rt2860_resume(
return 0;
}
#endif // CONFIG_PM //
-#endif
static INT __init rt2860_init_module(VOID)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
return pci_register_driver(&rt2860_driver);
-#else
- return pci_module_init(&rt2860_driver);
-#endif
}
@@ -374,11 +360,7 @@ static VOID __devexit rt2860_remove_one(
}
// Free pre-allocated net_device memory
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
free_netdev(net_dev);
-#else
- kfree(net_dev);
-#endif
}
//
@@ -758,11 +740,7 @@ static void ac0_dma_done_tasklet(unsigned long data)
int print_int_count;
IRQ_HANDLE_TYPE
-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19))
rt2860_interrupt(int irq, void *dev_instance)
-#else
-rt2860_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
-#endif
{
struct net_device *net_dev = (struct net_device *) dev_instance;
PRTMP_ADAPTER pAd = net_dev->ml_priv;
@@ -809,11 +787,7 @@ rt2860_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
if (RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_RESET_IN_PROGRESS) ||
RTMP_TEST_FLAG(pAd, fRTMP_ADAPTER_HALT_IN_PROGRESS))
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
- return IRQ_HANDLED;
-#else
- return;
-#endif
+ return IRQ_HANDLED;
}
//
@@ -832,11 +806,7 @@ rt2860_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
if (IntSource.word == 0xffffffff)
{
RTMP_SET_FLAG(pAd, fRTMP_ADAPTER_NIC_NOT_EXIST | fRTMP_ADAPTER_HALT_IN_PROGRESS);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
- return IRQ_HANDLED;
-#else
- return;
-#endif
+ return IRQ_HANDLED;
}
if (IntSource.word & TxCoherent)
@@ -970,10 +940,7 @@ rt2860_interrupt(int irq, void *dev_instance, struct pt_regs *regs)
}
#endif // CONFIG_STA_SUPPORT //
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
return IRQ_HANDLED;
-#endif
-
}
/*
@@ -1026,11 +993,7 @@ BOOLEAN RT28XXNetDevInit(
ULONG csr_addr;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
- print_name = pci_dev ? pci_name(pci_dev) : "rt2860";
-#else
- print_name = pci_dev ? pci_dev->slot_name : "rt2860";
-#endif // LINUX_VERSION_CODE //
+ print_name = pci_dev ? pci_name(pci_dev) : "rt2860";
net_dev->base_addr = 0;
net_dev->irq = 0;