All of lore.kernel.org
 help / color / mirror / Atom feed
From: trem <tremyfr@yahoo.fr>
To: kernel-janitors@vger.kernel.org
Subject: Re: [KJ] replace deprecated pci_find_device
Date: Tue, 22 Aug 2006 21:51:56 +0000	[thread overview]
Message-ID: <44EB7C7C.7050707@yahoo.fr> (raw)
In-Reply-To: <200608211744.51043.quinte17@gmx.de>

Hi

I see a function named "cleanup_module" with some code to free pci board.
I think that 'pci_dev_put' could be added there. Be carreful, it's just
a proposition.

By the way, last time I've tried to do such change (pci_find_device ->
pci_get_device),
gkh answers me to use new PCI driver model (pci_register_driver).  I
don't kown if
it should be done here too.


trem





Stephan Sperber wrote:
> Hello everybody!
> The included patch is my first try, so be critical :)
> On the TODO list is mentioned that pci_find_device should be replaced with 
> pci_get_dev. It also mentions that after shutting down the device a 
> pci_dev_put(*dev) is needed to free the used memory again. And here is the 
> problem I have. I don't see a "shutdownfunction" in ip2main.c nor in the 
> other ip2 related files. Or did I miss something?
>
> Thank you for any input on this topic.
>
> Stephan
>
> diff --git a/drivers/char/ip2/ip2main.c b/drivers/char/ip2/ip2main.c
> index 7907ae8..11b4f25 100644
> --- a/drivers/char/ip2/ip2main.c
> +++ b/drivers/char/ip2/ip2main.c
> @@ -589,7 +589,7 @@ ip2_loadmain(int *iop, int *irqp, unsign
>  #ifdef CONFIG_PCI
>  			{
>  				struct pci_dev *pci_dev_i = NULL;
> -				pci_dev_i = pci_find_device(PCI_VENDOR_ID_COMPUTONE,
> +				pci_dev_i = pci_get_device(PCI_VENDOR_ID_COMPUTONE,
>  							  PCI_DEVICE_ID_COMPUTONE_IP2EX, pci_dev_i);
>  				if (pci_dev_i != NULL) {
>  					unsigned int addr;
> _______________________________________________
> Kernel-janitors mailing list
> Kernel-janitors@lists.osdl.org
> https://lists.osdl.org/mailman/listinfo/kernel-janitors
>
>   

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

      parent reply	other threads:[~2006-08-22 21:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-21 15:44 [KJ] replace deprecated pci_find_device Stephan Sperber
2006-08-21 16:47 ` walter harms
2006-08-22 21:51 ` trem [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=44EB7C7C.7050707@yahoo.fr \
    --to=tremyfr@yahoo.fr \
    --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.