Commit 778a43fd authored by Adrian Bunk's avatar Adrian Bunk Committed by David S. Miller

[IRDA] vlsi_ir.{h,c}: remove kernel 2.4 code

This patch removes kernel 2.4 compatibility code.
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Acked-by: default avatarSamuel Ortiz <samuel@sortiz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fb7e2399
...@@ -166,7 +166,7 @@ static void vlsi_proc_pdev(struct seq_file *seq, struct pci_dev *pdev) ...@@ -166,7 +166,7 @@ static void vlsi_proc_pdev(struct seq_file *seq, struct pci_dev *pdev)
unsigned i; unsigned i;
seq_printf(seq, "\n%s (vid/did: %04x/%04x)\n", seq_printf(seq, "\n%s (vid/did: %04x/%04x)\n",
PCIDEV_NAME(pdev), (int)pdev->vendor, (int)pdev->device); pci_name(pdev), (int)pdev->vendor, (int)pdev->device);
seq_printf(seq, "pci-power-state: %u\n", (unsigned) pdev->current_state); seq_printf(seq, "pci-power-state: %u\n", (unsigned) pdev->current_state);
seq_printf(seq, "resources: irq=%u / io=0x%04x / dma_mask=0x%016Lx\n", seq_printf(seq, "resources: irq=%u / io=0x%04x / dma_mask=0x%016Lx\n",
pdev->irq, (unsigned)pci_resource_start(pdev, 0), (unsigned long long)pdev->dma_mask); pdev->irq, (unsigned)pci_resource_start(pdev, 0), (unsigned long long)pdev->dma_mask);
...@@ -1401,7 +1401,7 @@ static void vlsi_tx_timeout(struct net_device *ndev) ...@@ -1401,7 +1401,7 @@ static void vlsi_tx_timeout(struct net_device *ndev)
if (vlsi_start_hw(idev)) if (vlsi_start_hw(idev))
IRDA_ERROR("%s: failed to restart hw - %s(%s) unusable!\n", IRDA_ERROR("%s: failed to restart hw - %s(%s) unusable!\n",
__FUNCTION__, PCIDEV_NAME(idev->pdev), ndev->name); __FUNCTION__, pci_name(idev->pdev), ndev->name);
else else
netif_start_queue(ndev); netif_start_queue(ndev);
} }
...@@ -1643,7 +1643,7 @@ vlsi_irda_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -1643,7 +1643,7 @@ vlsi_irda_probe(struct pci_dev *pdev, const struct pci_device_id *id)
pdev->current_state = 0; /* hw must be running now */ pdev->current_state = 0; /* hw must be running now */
IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n", IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n",
drivername, PCIDEV_NAME(pdev)); drivername, pci_name(pdev));
if ( !pci_resource_start(pdev,0) if ( !pci_resource_start(pdev,0)
|| !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) { || !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) {
...@@ -1728,7 +1728,7 @@ static void __devexit vlsi_irda_remove(struct pci_dev *pdev) ...@@ -1728,7 +1728,7 @@ static void __devexit vlsi_irda_remove(struct pci_dev *pdev)
pci_set_drvdata(pdev, NULL); pci_set_drvdata(pdev, NULL);
IRDA_MESSAGE("%s: %s removed\n", drivername, PCIDEV_NAME(pdev)); IRDA_MESSAGE("%s: %s removed\n", drivername, pci_name(pdev));
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
...@@ -1748,7 +1748,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -1748,7 +1748,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state)
if (!ndev) { if (!ndev) {
IRDA_ERROR("%s - %s: no netdevice \n", IRDA_ERROR("%s - %s: no netdevice \n",
__FUNCTION__, PCIDEV_NAME(pdev)); __FUNCTION__, pci_name(pdev));
return 0; return 0;
} }
idev = ndev->priv; idev = ndev->priv;
...@@ -1759,7 +1759,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) ...@@ -1759,7 +1759,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state)
pdev->current_state = state.event; pdev->current_state = state.event;
} }
else else
IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state.event); IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, pci_name(pdev), pdev->current_state, state.event);
up(&idev->sem); up(&idev->sem);
return 0; return 0;
} }
...@@ -1787,7 +1787,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev) ...@@ -1787,7 +1787,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev)
if (!ndev) { if (!ndev) {
IRDA_ERROR("%s - %s: no netdevice \n", IRDA_ERROR("%s - %s: no netdevice \n",
__FUNCTION__, PCIDEV_NAME(pdev)); __FUNCTION__, pci_name(pdev));
return 0; return 0;
} }
idev = ndev->priv; idev = ndev->priv;
...@@ -1795,7 +1795,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev) ...@@ -1795,7 +1795,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev)
if (pdev->current_state == 0) { if (pdev->current_state == 0) {
up(&idev->sem); up(&idev->sem);
IRDA_WARNING("%s - %s: already resumed\n", IRDA_WARNING("%s - %s: already resumed\n",
__FUNCTION__, PCIDEV_NAME(pdev)); __FUNCTION__, pci_name(pdev));
return 0; return 0;
} }
......
...@@ -41,39 +41,6 @@ ...@@ -41,39 +41,6 @@
#define PCI_CLASS_SUBCLASS_MASK 0xffff #define PCI_CLASS_SUBCLASS_MASK 0xffff
#endif #endif
/* in recent 2.5 interrupt handlers have non-void return value */
#ifndef IRQ_RETVAL
typedef void irqreturn_t;
#define IRQ_NONE
#define IRQ_HANDLED
#define IRQ_RETVAL(x)
#endif
/* some stuff need to check kernelversion. Not all 2.5 stuff was present
* in early 2.5.x - the test is merely to separate 2.4 from 2.5
*/
#include <linux/version.h>
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
/* PDE() introduced in 2.5.4 */
#ifdef CONFIG_PROC_FS
#define PDE(inode) ((inode)->i_private)
#endif
/* irda crc16 calculation exported in 2.5.42 */
#define irda_calc_crc16(fcs,buf,len) (GOOD_FCS)
/* we use this for unified pci device name access */
#define PCIDEV_NAME(pdev) ((pdev)->name)
#else /* 2.5 or later */
/* whatever we get from the associated struct device - bus:slot:dev.fn id */
#define PCIDEV_NAME(pdev) (pci_name(pdev))
#endif
/* ================================================================ */ /* ================================================================ */
/* non-standard PCI registers */ /* non-standard PCI registers */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment