diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-01-24 00:16:40 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-01-24 00:16:40 -0500 |
commit | 778a43fd626b710faca32038afc7460f314ba82a (patch) | |
tree | b1640a7eefbb22638e67efcb89393610351d4575 | |
parent | fb7e2399ec17f1004c0e0ccfd17439f8759ede01 (diff) |
[IRDA] vlsi_ir.{h,c}: remove kernel 2.4 code
This patch removes kernel 2.4 compatibility code.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Samuel Ortiz <samuel@sortiz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/irda/vlsi_ir.c | 16 | ||||
-rw-r--r-- | drivers/net/irda/vlsi_ir.h | 33 |
2 files changed, 8 insertions, 41 deletions
diff --git a/drivers/net/irda/vlsi_ir.c b/drivers/net/irda/vlsi_ir.c index 18c68193bf14..e2b1af618450 100644 --- a/drivers/net/irda/vlsi_ir.c +++ b/drivers/net/irda/vlsi_ir.c | |||
@@ -166,7 +166,7 @@ static void vlsi_proc_pdev(struct seq_file *seq, struct pci_dev *pdev) | |||
166 | unsigned i; | 166 | unsigned i; |
167 | 167 | ||
168 | seq_printf(seq, "\n%s (vid/did: %04x/%04x)\n", | 168 | seq_printf(seq, "\n%s (vid/did: %04x/%04x)\n", |
169 | PCIDEV_NAME(pdev), (int)pdev->vendor, (int)pdev->device); | 169 | pci_name(pdev), (int)pdev->vendor, (int)pdev->device); |
170 | seq_printf(seq, "pci-power-state: %u\n", (unsigned) pdev->current_state); | 170 | seq_printf(seq, "pci-power-state: %u\n", (unsigned) pdev->current_state); |
171 | seq_printf(seq, "resources: irq=%u / io=0x%04x / dma_mask=0x%016Lx\n", | 171 | seq_printf(seq, "resources: irq=%u / io=0x%04x / dma_mask=0x%016Lx\n", |
172 | pdev->irq, (unsigned)pci_resource_start(pdev, 0), (unsigned long long)pdev->dma_mask); | 172 | 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 | 1401 | ||
1402 | if (vlsi_start_hw(idev)) | 1402 | if (vlsi_start_hw(idev)) |
1403 | IRDA_ERROR("%s: failed to restart hw - %s(%s) unusable!\n", | 1403 | IRDA_ERROR("%s: failed to restart hw - %s(%s) unusable!\n", |
1404 | __FUNCTION__, PCIDEV_NAME(idev->pdev), ndev->name); | 1404 | __FUNCTION__, pci_name(idev->pdev), ndev->name); |
1405 | else | 1405 | else |
1406 | netif_start_queue(ndev); | 1406 | netif_start_queue(ndev); |
1407 | } | 1407 | } |
@@ -1643,7 +1643,7 @@ vlsi_irda_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
1643 | pdev->current_state = 0; /* hw must be running now */ | 1643 | pdev->current_state = 0; /* hw must be running now */ |
1644 | 1644 | ||
1645 | IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n", | 1645 | IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n", |
1646 | drivername, PCIDEV_NAME(pdev)); | 1646 | drivername, pci_name(pdev)); |
1647 | 1647 | ||
1648 | if ( !pci_resource_start(pdev,0) | 1648 | if ( !pci_resource_start(pdev,0) |
1649 | || !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) { | 1649 | || !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) { |
@@ -1728,7 +1728,7 @@ static void __devexit vlsi_irda_remove(struct pci_dev *pdev) | |||
1728 | 1728 | ||
1729 | pci_set_drvdata(pdev, NULL); | 1729 | pci_set_drvdata(pdev, NULL); |
1730 | 1730 | ||
1731 | IRDA_MESSAGE("%s: %s removed\n", drivername, PCIDEV_NAME(pdev)); | 1731 | IRDA_MESSAGE("%s: %s removed\n", drivername, pci_name(pdev)); |
1732 | } | 1732 | } |
1733 | 1733 | ||
1734 | #ifdef CONFIG_PM | 1734 | #ifdef CONFIG_PM |
@@ -1748,7 +1748,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1748 | 1748 | ||
1749 | if (!ndev) { | 1749 | if (!ndev) { |
1750 | IRDA_ERROR("%s - %s: no netdevice \n", | 1750 | IRDA_ERROR("%s - %s: no netdevice \n", |
1751 | __FUNCTION__, PCIDEV_NAME(pdev)); | 1751 | __FUNCTION__, pci_name(pdev)); |
1752 | return 0; | 1752 | return 0; |
1753 | } | 1753 | } |
1754 | idev = ndev->priv; | 1754 | idev = ndev->priv; |
@@ -1759,7 +1759,7 @@ static int vlsi_irda_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1759 | pdev->current_state = state.event; | 1759 | pdev->current_state = state.event; |
1760 | } | 1760 | } |
1761 | else | 1761 | else |
1762 | IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, PCIDEV_NAME(pdev), pdev->current_state, state.event); | 1762 | IRDA_ERROR("%s - %s: invalid suspend request %u -> %u\n", __FUNCTION__, pci_name(pdev), pdev->current_state, state.event); |
1763 | up(&idev->sem); | 1763 | up(&idev->sem); |
1764 | return 0; | 1764 | return 0; |
1765 | } | 1765 | } |
@@ -1787,7 +1787,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev) | |||
1787 | 1787 | ||
1788 | if (!ndev) { | 1788 | if (!ndev) { |
1789 | IRDA_ERROR("%s - %s: no netdevice \n", | 1789 | IRDA_ERROR("%s - %s: no netdevice \n", |
1790 | __FUNCTION__, PCIDEV_NAME(pdev)); | 1790 | __FUNCTION__, pci_name(pdev)); |
1791 | return 0; | 1791 | return 0; |
1792 | } | 1792 | } |
1793 | idev = ndev->priv; | 1793 | idev = ndev->priv; |
@@ -1795,7 +1795,7 @@ static int vlsi_irda_resume(struct pci_dev *pdev) | |||
1795 | if (pdev->current_state == 0) { | 1795 | if (pdev->current_state == 0) { |
1796 | up(&idev->sem); | 1796 | up(&idev->sem); |
1797 | IRDA_WARNING("%s - %s: already resumed\n", | 1797 | IRDA_WARNING("%s - %s: already resumed\n", |
1798 | __FUNCTION__, PCIDEV_NAME(pdev)); | 1798 | __FUNCTION__, pci_name(pdev)); |
1799 | return 0; | 1799 | return 0; |
1800 | } | 1800 | } |
1801 | 1801 | ||
diff --git a/drivers/net/irda/vlsi_ir.h b/drivers/net/irda/vlsi_ir.h index c37f0bc4c7f9..2d3b773d8e35 100644 --- a/drivers/net/irda/vlsi_ir.h +++ b/drivers/net/irda/vlsi_ir.h | |||
@@ -41,39 +41,6 @@ | |||
41 | #define PCI_CLASS_SUBCLASS_MASK 0xffff | 41 | #define PCI_CLASS_SUBCLASS_MASK 0xffff |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | /* in recent 2.5 interrupt handlers have non-void return value */ | ||
45 | #ifndef IRQ_RETVAL | ||
46 | typedef void irqreturn_t; | ||
47 | #define IRQ_NONE | ||
48 | #define IRQ_HANDLED | ||
49 | #define IRQ_RETVAL(x) | ||
50 | #endif | ||
51 | |||
52 | /* some stuff need to check kernelversion. Not all 2.5 stuff was present | ||
53 | * in early 2.5.x - the test is merely to separate 2.4 from 2.5 | ||
54 | */ | ||
55 | #include <linux/version.h> | ||
56 | |||
57 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) | ||
58 | |||
59 | /* PDE() introduced in 2.5.4 */ | ||
60 | #ifdef CONFIG_PROC_FS | ||
61 | #define PDE(inode) ((inode)->i_private) | ||
62 | #endif | ||
63 | |||
64 | /* irda crc16 calculation exported in 2.5.42 */ | ||
65 | #define irda_calc_crc16(fcs,buf,len) (GOOD_FCS) | ||
66 | |||
67 | /* we use this for unified pci device name access */ | ||
68 | #define PCIDEV_NAME(pdev) ((pdev)->name) | ||
69 | |||
70 | #else /* 2.5 or later */ | ||
71 | |||
72 | /* whatever we get from the associated struct device - bus:slot:dev.fn id */ | ||
73 | #define PCIDEV_NAME(pdev) (pci_name(pdev)) | ||
74 | |||
75 | #endif | ||
76 | |||
77 | /* ================================================================ */ | 44 | /* ================================================================ */ |
78 | 45 | ||
79 | /* non-standard PCI registers */ | 46 | /* non-standard PCI registers */ |