All of lore.kernel.org
 help / color / mirror / Atom feed
From: Domen Puncer <domen@coderock.org>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] [PATCH] pci_*() for drivers/media/radio/
Date: Wed, 02 Feb 2005 10:26:11 +0000	[thread overview]
Message-ID: <20050202102611.GA4463@nd47.coderock.org> (raw)
In-Reply-To: <20050202082305.GB24725@rhum.iomeda.fr>

[-- Attachment #1: Type: text/plain, Size: 1217 bytes --]

On 02/02/05 09:23 +0100, Christophe Lucas wrote:
> Hi,
> 
> Description:
> >From : http://kerneljanitors.org/TODO
> >- delete all pci_find_* functions from the kernel tree.
> >  Instead of pci_find_device use pci_get_device()..
> >-  convert from pci_module_init to pci_register_driver
> 
> Signed-off-by: Christophe Lucas <c.lucas@ifrance.com>
> -- 
> Christophe
...

> diff -urpN -X /work/users/dontdiff linux-2.6.11-rc2-vanilla/drivers/media/radio/radio-maestro.c linux-2.6.11-rc2/drivers/media/radio/radio-maestro.c
> --- linux-2.6.11-rc2-vanilla/drivers/media/radio/radio-maestro.c	2005-01-26 08:31:14.000000000 +0100
> +++ linux-2.6.11-rc2/drivers/media/radio/radio-maestro.c	2005-01-26 10:30:27.000000000 +0100
> @@ -265,11 +265,11 @@ static int __init maestro_radio_init(voi
>  {
>  	register __u16 found=0;
>  	struct pci_dev *pcidev = NULL;
> -	while(!found && (pcidev = pci_find_device(PCI_VENDOR_ESS, 
> +	while(!found && (pcidev = pci_get_device(PCI_VENDOR_ESS, 
>  						  PCI_DEVICE_ID_ESS_ESS1968,
>  						  pcidev)))

I recall from Hanna Linder patches that this is not a search and replace,
pci_get_device implements refcounting, so you have to put (pci_dev_put?)
on error and exit paths.


	Domen

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

      reply	other threads:[~2005-02-02 10:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-02  8:23 [KJ] [PATCH] pci_*() for drivers/media/radio/ Christophe Lucas
2005-02-02 10:26 ` Domen Puncer [this message]

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=20050202102611.GA4463@nd47.coderock.org \
    --to=domen@coderock.org \
    --cc=kernel-janitors@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.