From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/5] Char: rocket, remove pci_read_config_dword(CLASS_REVISION)
Date: Mon, 15 Oct 2007 12:30:28 -0400 [thread overview]
Message-ID: <30460624014748892@pripojeni.net> (raw)
In-Reply-To: <25409162611123630013@pripojeni.net>
rocket, remove pci_read_config_dword(CLASS_REVISION)
We may use pdev->revision instead of reading pci config space directly, so
remove pci_read_config_dword invoking.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
---
commit 2b2c0385d705ce1f4207595f8fda12c25ee39de3
tree 2c09638bcb6ee3f671dd3038c21efeb2b958e6dc
parent ad37fddef12ce908078883fdc27297216c6d122e
author Jiri Slaby <jirislaby@gmail.com> Mon, 15 Oct 2007 14:42:18 +0200
committer Jiri Slaby <jirislaby@gmail.com> Mon, 15 Oct 2007 14:42:18 +0200
drivers/char/rocket.c | 15 ++++-----------
1 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index 5fd1ed7..e4bcfa2 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -1869,8 +1869,6 @@ static __init int register_PCI(int i, struct pci_dev *dev)
int fast_clock = 0;
int altChanRingIndicator = 0;
int ports_per_aiop = 8;
- int ret;
- unsigned int class_rev;
WordIO_t ConfigIO = 0;
ByteIO_t UPCIRingInd = 0;
@@ -1878,12 +1876,6 @@ static __init int register_PCI(int i, struct pci_dev *dev)
return 0;
rcktpt_io_addr[i] = pci_resource_start(dev, 0);
- ret = pci_read_config_dword(dev, PCI_CLASS_REVISION, &class_rev);
-
- if (ret) {
- printk(KERN_INFO " Error during register_PCI(), unable to read config dword \n");
- return 0;
- }
rcktpt_type[i] = ROCKET_TYPE_NORMAL;
rocketModel[i].loadrm2 = 0;
@@ -2037,8 +2029,9 @@ static __init int register_PCI(int i, struct pci_dev *dev)
ports_per_aiop = 6;
str = "6-port";
- /* If class_rev is 1, the rocketmodem flash must be loaded. If it is 2 it is a "socketed" version. */
- if ((class_rev & 0xFF) == 1) {
+ /* If revision is 1, the rocketmodem flash must be loaded.
+ * If it is 2 it is a "socketed" version. */
+ if (dev->revision == 1) {
rcktpt_type[i] = ROCKET_TYPE_MODEMII;
rocketModel[i].loadrm2 = 1;
} else {
@@ -2053,7 +2046,7 @@ static __init int register_PCI(int i, struct pci_dev *dev)
max_num_aiops = 1;
ports_per_aiop = 4;
str = "4-port";
- if ((class_rev & 0xFF) == 1) {
+ if (dev->revision == 1) {
rcktpt_type[i] = ROCKET_TYPE_MODEMII;
rocketModel[i].loadrm2 = 1;
} else {
next prev parent reply other threads:[~2007-10-15 16:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-15 16:29 [PATCH 1/5] Char: rocket, fix dynamic_dev tty Jiri Slaby
2007-10-15 16:29 ` [PATCH 2/5] Char: rocket, don't re-set statics to 0 Jiri Slaby
2007-10-15 16:30 ` Jiri Slaby [this message]
2007-10-15 16:31 ` [PATCH 4/5] Char: rocket, remove potential leak in module_init Jiri Slaby
2007-10-15 16:31 ` [PATCH 5/5] Char: rocket, fix signed/unsigned warning Jiri Slaby
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=30460624014748892@pripojeni.net \
--to=jirislaby@gmail.com \
--cc=akpm@linux-foundation.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®