LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: Alan <alan@lxorguk.ukuu.org.uk>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pm3fb: kill pci_find_device usage
Date: Thu, 8 Feb 2007 18:45:34 +0000 (GMT)	[thread overview]
Message-ID: <Pine.LNX.4.64.0702081845050.7686@pentafluge.infradead.org> (raw)
In-Reply-To: <20070131170620.13d88820@localhost.localdomain>


On Wed, 31 Jan 2007, Alan wrote:

> Signed-off-by: Alan Cox <alan@redhat.com>
> 
> diff -u --new-file --recursive --exclude-from /usr/src/exclude linux.vanilla-2.6.20-rc6-mm3/drivers/video/pm3fb.c linux-2.6.20-rc6-mm3/drivers/video/pm3fb.c
> --- linux.vanilla-2.6.20-rc6-mm3/drivers/video/pm3fb.c	2007-01-31 14:20:10.000000000 +0000
> +++ linux-2.6.20-rc6-mm3/drivers/video/pm3fb.c	2007-01-31 14:36:25.000000000 +0000
> @@ -3299,14 +3299,12 @@
>  		fb_info[i].dev = NULL;
>  	}
>  
> -	dev =
> -	    pci_find_device(PCI_VENDOR_ID_3DLABS,
> +	dev = pci_get_device(PCI_VENDOR_ID_3DLABS,
>  			    PCI_DEVICE_ID_3DLABS_PERMEDIA3, dev);
>  
>  	for (i = 0; ((i < PM3_MAX_BOARD) && dev); i++) {
>  		dev_array[i] = dev;
> -		dev =
> -		    pci_find_device(PCI_VENDOR_ID_3DLABS,
> +		dev = pci_get_device(PCI_VENDOR_ID_3DLABS,
>  				    PCI_DEVICE_ID_3DLABS_PERMEDIA3, dev);
>  	}
>  
> @@ -3353,7 +3351,7 @@
>  	/* now, initialize... or not */
>  	for (i = 0; i < PM3_MAX_BOARD; i++) {
>  		l_fb_info = &(fb_info[i]);
> -		if ((l_fb_info->dev) && (!disable[i])) {	/* PCI device was found and not disabled by user */
> +		if (l_fb_info->dev && !disable[i]) {	/* PCI device was found and not disabled by user */
>  			DPRINTK(2,
>  				"found @%lx Vendor %lx Device %lx ; base @ : %lx - %lx - %lx - %lx - %lx - %lx, irq %ld\n",
>  				(unsigned long) l_fb_info->dev,
> @@ -3608,7 +3606,7 @@
>  
>  	pm3fb_init();
>  
> -	return (0);
> +	return 0;
>  }
>  
>  void cleanup_module(void)
> @@ -3619,23 +3617,18 @@
>  		struct pm3fb_info *l_fb_info;
>  		for (i = 0; i < PM3_MAX_BOARD; i++) {
>  			l_fb_info = &(fb_info[i]);
> -			if ((l_fb_info->dev != NULL)
> -			    && (!(disable[l_fb_info->board_num]))) {
> -				if (l_fb_info->vIOBase !=
> -				    (unsigned char *) -1) {
> +			pci_dev_put(l_fb_info->dev);
> +			if (l_fb_info->dev != NULL  && !(disable[l_fb_info->board_num])) {
> +				if (l_fb_info->vIOBase != (unsigned char *) -1) {
>  					pm3fb_unmapIO(l_fb_info);
>  					release_mem_region(l_fb_info->p_fb,
> -							   l_fb_info->
> -							   fb_size);
> -					release_mem_region(l_fb_info->
> -							   pIOBase,
> -							   PM3_REGS_SIZE);
> +						   l_fb_info->fb_size);
> +					release_mem_region(l_fb_info->pIOBase,
> +						   PM3_REGS_SIZE);
>  				}
> -				unregister_framebuffer(&l_fb_info->gen.
> -						       info);
> +				unregister_framebuffer(&l_fb_info->gen.info);
>  			}
>  		}
>  	}
> -	return;
>  }
>  #endif /* MODULE */

Acked-By: James Simmons <jsimmons@infradead.org>


      reply	other threads:[~2007-02-08 18:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-31 17:06 Alan
2007-02-08 18:45 ` James Simmons [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=Pine.LNX.4.64.0702081845050.7686@pentafluge.infradead.org \
    --to=jsimmons@infradead.org \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [PATCH] pm3fb: kill pci_find_device usage' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).