All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Slaby <jirislaby@gmail.com>
To: Andrew Morton <akpm@osdl.org>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH 3/7] Char: moxa, remove moxa_pci_devinfo
Date: Fri,  5 Jan 2007 18:11:03 +0100 (CET)	[thread overview]
Message-ID: <16552191032074511145@wsc.cz> (raw)
In-Reply-To: <16079316021425814645@wsc.cz>

moxa, remove moxa_pci_devinfo

Nothing is used from this struct but *pdev. Remove it and store only pdev.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>

---
commit 6e83fe1d42725f7f704cc50ab130805fba5b548b
tree bcd6ac4107e808a9e78f7d8bffe08d7e5749c8e1
parent 040f78a69ad874e2976ab93a55cde2dc02df7d66
author Jiri Slaby <jirislaby@gmail.com> Wed, 03 Jan 2007 12:34:01 +0059
committer Jiri Slaby <jirislaby@gmail.com> Fri, 05 Jan 2007 17:38:50 +0059

 drivers/char/moxa.c |   15 +++------------
 1 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 9eb8fa6..2899bea 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -102,18 +102,12 @@ static struct moxa_isa_board_conf moxa_isa_boards[] =
 /*       {MOXA_BOARD_C218_ISA,8,0xDC000}, */
 };
 
-struct moxa_pci_devinfo {
-	ushort busNum;
-	ushort devNum;
-	struct pci_dev *pdev;
-};
-
 struct moxa_board_conf {
 	int boardType;
 	int numPorts;
 	unsigned long baseAddr;
 	int busType;
-	struct moxa_pci_devinfo pciInfo;
+	struct pci_dev *pdev;
 };
 
 static struct moxa_board_conf moxa_boards[MAX_BOARDS];
@@ -284,11 +278,8 @@ static int moxa_get_PCI_conf(struct pci_dev *p, int board_type,
 		break;
 	}
 	board->busType = MOXA_BUS_TYPE_PCI;
-	board->pciInfo.busNum = p->bus->number;
-	board->pciInfo.devNum = p->devfn >> 3;
-	board->pciInfo.pdev = p;
 	/* don't lose the reference in the next pci_get_device iteration */
-	pci_dev_get(p);
+	board->pdev = pci_dev_get(p);
 
 	return (0);
 }
@@ -437,7 +428,7 @@ static void __exit moxa_exit(void)
 		if (moxaBaseAddr[i])
 			iounmap(moxaBaseAddr[i]);
 		if (moxa_boards[i].busType == MOXA_BUS_TYPE_PCI)
-			pci_dev_put(moxa_boards[i].pciInfo.pdev);
+			pci_dev_put(moxa_boards[i].pdev);
 	}
 
 	if (verbose)

  parent reply	other threads:[~2007-01-05 17:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-05 17:10 [PATCH 1/7] Char: moxa, macros cleanup Jiri Slaby
2007-01-05 17:10 ` [PATCH 2/7] Char: moxa, use del_timer_sync Jiri Slaby
2007-01-05 17:11 ` Jiri Slaby [this message]
2007-01-05 17:11 ` [PATCH 4/7] Char: moxa, variables cleanup Jiri Slaby
2007-01-05 17:11 ` [PATCH 5/7] Char: moxa, remove useless vairables Jiri Slaby
2007-01-05 17:12 ` [PATCH 6/7] Char: moxa, pci_probing prepare Jiri Slaby
2007-01-05 17:12 ` [PATCH 7/7] Char: moxa, pci probing 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=16552191032074511145@wsc.cz \
    --to=jirislaby@gmail.com \
    --cc=akpm@osdl.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 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.