From: Ian Abbott <abbotti@mev.co.uk>
To: Chase Southwood <chase.southwood@gmail.com>,
<gregkh@linuxfoundation.org>
Cc: <hsweeten@visionengravers.com>, <devel@driverdev.osuosl.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 4/6] staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the unused bars
Date: Mon, 28 Apr 2014 11:19:31 +0100 [thread overview]
Message-ID: <535E2B33.9030308@mev.co.uk> (raw)
In-Reply-To: <1398562636-5900-1-git-send-email-chase.southwood@gmail.com>
On 2014-04-27 02:37, Chase Southwood wrote:
> This driver only uses PCI bar 1 (devpriv->i_IobaseAmcc), and PCI bar 2
> (dev->iobase) doon't bother reading the unused PCI bars.
>
> Signed-off-by: Chase Southwood <chase.southwood@gmail.com>
> Cc: Ian Abbott <abbotti@mev.co.uk>
> Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
> ---
>
> Hartley,
>
> As far as I can tell from reading the I/O Mapping you sent me, these bar
> numbers are correct, but it seems a bit odd, so please offer correction
> if I am interpreting the document incorrectly.
>
> Thanks,
> Chase
>
> drivers/staging/comedi/drivers/addi_apci_1564.c | 11 ++---------
> 1 file changed, 2 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/addi_apci_1564.c b/drivers/staging/comedi/drivers/addi_apci_1564.c
> index fe42f9d..7e42d47 100644
> --- a/drivers/staging/comedi/drivers/addi_apci_1564.c
> +++ b/drivers/staging/comedi/drivers/addi_apci_1564.c
> @@ -65,15 +65,8 @@ static int apci1564_auto_attach(struct comedi_device *dev,
> if (ret)
> return ret;
>
> - if (this_board->i_IorangeBase1)
> - dev->iobase = pci_resource_start(pcidev, 1);
> - else
> - dev->iobase = pci_resource_start(pcidev, 0);
> -
> - devpriv->iobase = dev->iobase;
> - devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
> - devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2);
> - devpriv->i_IobaseReserved = pci_resource_start(pcidev, 3);
> + dev->iobase = pci_resource_start(pcidev, 2);
> + devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 1);
I'm sure the original resources are correct, so since
this_board->i_IorangeBase1 is non-zero:
dev->iobase = pci_resource_start(pcidev, 1);
devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
I suspect the member name 'i_IobaseAmcc' is just a hangover from the
distant past and could just be changed to 'iobasemain' or something,
since most of the code seems to use it.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
next prev parent reply other threads:[~2014-04-28 10:19 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-27 1:35 [PATCH 1/6] staging: comedi: addi_apci_1564: remove eeprom support code Chase Southwood
2014-04-27 1:36 ` [PATCH 2/6] staging: comedi: addi_apci_1564: remove unnecessary include Chase Southwood
2014-04-27 1:37 ` [PATCH 3/6] staging: comedi: addi_apci_1032: board has 32 digital inputs Chase Southwood
[not found] ` <DC148C5AA1CEBA4E87973D432B1C2D8825E1F7F8@P3PWEX4MB008.ex4.secureserver.net>
2014-04-28 21:57 ` Ian Abbott
2014-04-29 8:34 ` [PATCH 3/6 v2] staging: comedi: addi_apci_1564: " Chase Southwood
2014-04-29 13:15 ` Ian Abbott
2014-04-27 1:37 ` [PATCH 4/6] staging: comedi: addi_apci_1564: simplify the PCI bar reading and don't read the unused bars Chase Southwood
2014-04-28 10:19 ` Ian Abbott [this message]
2014-04-28 11:10 ` Ian Abbott
[not found] ` <DC148C5AA1CEBA4E87973D432B1C2D8825E1F7CD@P3PWEX4MB008.ex4.secureserver.net>
2014-04-29 8:22 ` Chase Southwood
2014-04-29 8:35 ` [PATCH 4/6 v2] " Chase Southwood
2014-04-29 13:19 ` Ian Abbott
2014-04-30 7:57 ` [PATCH 4/6 v3] " Chase Southwood
2014-04-30 8:47 ` Ian Abbott
2014-04-27 1:38 ` [PATCH 5/6] staging: comedi: addi_apci_2032: remove unnecessary info from boardinfo Chase Southwood
2014-04-29 8:37 ` [PATCH 5/6 v2] staging: comedi: addi_apci_1564: " Chase Southwood
2014-04-29 13:17 ` Ian Abbott
2014-04-27 1:38 ` [PATCH 6/6] staging: comedi: addi_apci_2032: remove use of devpriv->s_EeParameters Chase Southwood
[not found] ` <DC148C5AA1CEBA4E87973D432B1C2D8825E1F6C5@P3PWEX4MB008.ex4.secureserver.net>
2014-04-29 8:16 ` Chase Southwood
2014-04-29 8:38 ` [PATCH 6/6 v2] staging: comedi: addi_apci_1564: " Chase Southwood
2014-04-29 13:20 ` Ian Abbott
2014-04-29 20:33 ` Hartley Sweeten
2014-04-30 7:52 ` Chase Southwood
2014-04-30 16:58 ` Hartley Sweeten
2014-05-01 3:32 ` Chase Southwood
2014-05-03 7:49 ` [PATCH 6/6 v3] " Chase Southwood
2014-04-28 9:40 ` [PATCH 1/6] staging: comedi: addi_apci_1564: remove eeprom support code Dan Carpenter
2014-05-03 23:52 ` Greg KH
2014-05-04 19:48 ` Chase Southwood
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=535E2B33.9030308@mev.co.uk \
--to=abbotti@mev.co.uk \
--cc=chase.southwood@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=hsweeten@visionengravers.com \
--cc=linux-kernel@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.