From: Samuel Ortiz <samuel@sortiz.org>
To: Adrian Bunk <bunk@stusta.de>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [2.6 patch] drivers/net/irda/vlsi_ir.{h,c}: remove kernel 2.4 code
Date: Sun, 21 Jan 2007 23:36:58 +0200 [thread overview]
Message-ID: <20070121213657.GA9464@sortiz.org> (raw)
In-Reply-To: <20070118215613.GH9093@stusta.de>
On Thu, Jan 18, 2007 at 10:56:13PM +0100, Adrian Bunk wrote:
> This patch removes kernel 2.4 compatibility code.
Looks correct to me, thanks.
> Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Samuel Ortiz <samuel@sortiz.org>
> ---
>
> drivers/net/irda/vlsi_ir.c | 16 ++++++++--------
> drivers/net/irda/vlsi_ir.h | 33 ---------------------------------
> 2 files changed, 8 insertions(+), 41 deletions(-)
>
> --- linux-2.6.20-rc4-mm1/drivers/net/irda/vlsi_ir.h.old 2007-01-18 21:50:43.000000000 +0100
> +++ linux-2.6.20-rc4-mm1/drivers/net/irda/vlsi_ir.h 2007-01-18 21:53:54.000000000 +0100
> @@ -41,39 +41,6 @@
> #define PCI_CLASS_SUBCLASS_MASK 0xffff
> #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 */
> --- linux-2.6.20-rc4-mm1/drivers/net/irda/vlsi_ir.c.old 2007-01-18 21:53:58.000000000 +0100
> +++ linux-2.6.20-rc4-mm1/drivers/net/irda/vlsi_ir.c 2007-01-18 21:54:56.000000000 +0100
> @@ -166,7 +166,7 @@
> unsigned i;
>
> 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, "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);
> @@ -1401,7 +1401,7 @@
>
> if (vlsi_start_hw(idev))
> 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
> netif_start_queue(ndev);
> }
> @@ -1643,7 +1643,7 @@
> pdev->current_state = 0; /* hw must be running now */
>
> IRDA_MESSAGE("%s: IrDA PCI controller %s detected\n",
> - drivername, PCIDEV_NAME(pdev));
> + drivername, pci_name(pdev));
>
> if ( !pci_resource_start(pdev,0)
> || !(pci_resource_flags(pdev,0) & IORESOURCE_IO) ) {
> @@ -1728,7 +1728,7 @@
>
> 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
> @@ -1748,7 +1748,7 @@
>
> if (!ndev) {
> IRDA_ERROR("%s - %s: no netdevice \n",
> - __FUNCTION__, PCIDEV_NAME(pdev));
> + __FUNCTION__, pci_name(pdev));
> return 0;
> }
> idev = ndev->priv;
> @@ -1759,7 +1759,7 @@
> pdev->current_state = state.event;
> }
> 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);
> return 0;
> }
> @@ -1787,7 +1787,7 @@
>
> if (!ndev) {
> IRDA_ERROR("%s - %s: no netdevice \n",
> - __FUNCTION__, PCIDEV_NAME(pdev));
> + __FUNCTION__, pci_name(pdev));
> return 0;
> }
> idev = ndev->priv;
> @@ -1795,7 +1795,7 @@
> if (pdev->current_state == 0) {
> up(&idev->sem);
> IRDA_WARNING("%s - %s: already resumed\n",
> - __FUNCTION__, PCIDEV_NAME(pdev));
> + __FUNCTION__, pci_name(pdev));
> return 0;
> }
>
>
next prev parent reply other threads:[~2007-01-21 21:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-18 21:56 [2.6 patch] drivers/net/irda/vlsi_ir.{h,c}: remove kernel 2.4 code Adrian Bunk
2007-01-21 21:36 ` Samuel Ortiz [this message]
2007-01-24 5:16 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070121213657.GA9464@sortiz.org \
--to=samuel@sortiz.org \
--cc=bunk@stusta.de \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.