All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <teheo@suse.de>
To: Brandon Philips <bphilips@suse.de>
Cc: e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org
Subject: Re: [patch 4/4] Update e1000 driver to use devres.
Date: Thu, 16 Aug 2007 20:44:17 +0900	[thread overview]
Message-ID: <46C43891.4080304@suse.de> (raw)
In-Reply-To: <20070815190014.GE7294@ifup.org>

Brandon Philips wrote:
> -	mmio_start = pci_resource_start(pdev, BAR_0);
>  	mmio_len = pci_resource_len(pdev, BAR_0);

You don't need mmio_len either.

> -	err = -EIO;
> -	adapter->hw.hw_addr = ioremap(mmio_start, mmio_len);
> +	adapter->hw.hw_addr = pcim_iomap(pdev, BAR_0, mmio_len);

Passing 0 as @max_len tells pci[m]_iomap() to use pci_resource_len() of
the BAR.

> @@ -952,16 +948,15 @@ e1000_probe(struct pci_dev *pdev,
>  	/* setup the private structure */
>  
>  	if ((err = e1000_sw_init(adapter)))
> -		goto err_sw_init;
> +		return err;
>  
>  	err = -EIO;
>  	/* Flash BAR mapping must happen after e1000_sw_init
>  	 * because it depends on mac_type */
>  	if ((adapter->hw.mac_type == e1000_ich8lan) &&
>  	   (pci_resource_flags(pdev, 1) & IORESOURCE_MEM)) {
> -		flash_start = pci_resource_start(pdev, 1);
>  		flash_len = pci_resource_len(pdev, 1);

Ditto.

> -		adapter->hw.flash_address = ioremap(flash_start, flash_len);
> +		adapter->hw.flash_address = pcim_iomap(pdev, 1, flash_len);
>  		if (!adapter->hw.flash_address)
>  			goto err_flashmap;
>  	}

-- 
tejun

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/

  parent reply	other threads:[~2007-08-16 11:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-15 19:00 [patch 4/4] Update e1000 driver to use devres Brandon Philips
2007-08-16  8:38 ` Waskiewicz Jr, Peter P
2007-08-16 17:05   ` Brandon Philips
2007-08-16 17:09     ` Waskiewicz Jr, Peter P
2007-08-16 11:44 ` Tejun Heo [this message]
2007-08-16 17:36   ` Kok, Auke
2007-08-17 20:25     ` [PATCH] e1000e: Update e1000e " Brandon Philips
2007-08-18  0:51       ` Tejun Heo

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=46C43891.4080304@suse.de \
    --to=teheo@suse.de \
    --cc=bphilips@suse.de \
    --cc=e1000-devel@lists.sourceforge.net \
    --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.