All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jamie Lenehan <lenehan@twibble.org>
To: linux-scsi@vger.kernel.org
Cc: dc395x@twibble.org
Subject: [PATCH] dc395x [6/6] - use pci resource len
Date: Thu, 21 Aug 2003 20:17:59 +1000	[thread overview]
Message-ID: <20030821101759.GG7570@twibble.org> (raw)
In-Reply-To: <20030821101729.GF7570@twibble.org>

Instead of hard coding the number of io ports (to the wrong value no
less) use the pci_resource_length to determine the number.

diff -du -r a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c
--- a/drivers/scsi/dc395x.c	2003-08-20 21:39:11.817249304 +1000
+++ b/drivers/scsi/dc395x.c	2003-08-20 21:39:19.213124960 +1000
@@ -5843,7 +5843,7 @@
 		return -ENODEV;
 	}
 	io_port_base = pci_resource_start(dev, 0) & PCI_BASE_ADDRESS_IO_MASK;
-	io_port_len = 0x80;	/* XXX: use pci_resource_len? */
+	io_port_len = pci_resource_len(dev, 0);
 	irq = dev->irq;
 	dprintkdbg(DBG_0, "IO_PORT=%04x, IRQ=%x\n", io_port_base, dev->irq);
 

-- 
 Jamie Lenehan <lenehan@twibble.org>

  reply	other threads:[~2003-08-21 10:17 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-21 10:13 [PATCH] dc395x [0/6] - description Jamie Lenehan
2003-08-21 10:14 ` [PATCH] dc395x [1/6] - make functions static Jamie Lenehan
2003-08-21 10:15   ` [PATCH] dc395x [2/6] - cleanup devices Jamie Lenehan
2003-08-21 10:16     ` [PATCH] dc395x [3/6] - cleanup adapter init Jamie Lenehan
2003-08-21 10:16       ` [PATCH] dc395x [4/6] - cleanup adapter uninit Jamie Lenehan
2003-08-21 10:17         ` [PATCH] dc395x [5/6] - check for device Jamie Lenehan
2003-08-21 10:17           ` Jamie Lenehan [this message]
2003-08-21 10:46   ` [PATCH] dc395x [1/6] - make functions static Christoph Hellwig
2003-08-26 11:22     ` Jamie Lenehan
2003-08-26 16:54       ` Christoph Hellwig
2003-08-21 11:02 ` [Dc395x] [PATCH] dc395x [0/6] - description Ali Akcaagac

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=20030821101759.GG7570@twibble.org \
    --to=lenehan@twibble.org \
    --cc=dc395x@twibble.org \
    --cc=linux-scsi@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.