mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: JoonwooPark <joonwpark81@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: gregkh@suse.de, kristen.c.accardi@intel.com
Subject: [PATCH] PCI hotplug : Switch to pci_get_bus_and_slot instead of deprecated pci_find_slot.
Date: Mon, 01 Oct 2007 12:09:07 +0900	[thread overview]
Message-ID: <1191208147.6123.11.camel@joonwpark-desktop> (raw)

This patch fixes these warnings:

drivers/pci/hotplug/cpqphp_pci.c: In function ‘cpqhp_configure_device’:
drivers/pci/hotplug/cpqphp_pci.c:92: warning: ‘pci_find_slot’ is deprecated (declared at include/linux/pci.h:481)
drivers/pci/hotplug/cpqphp_pci.c:102: warning: ‘pci_find_slot’ is deprecated (declared at include/linux/pci.h:481)
drivers/pci/hotplug/cpqphp_pci.c: In function ‘cpqhp_unconfigure_device’:
drivers/pci/hotplug/cpqphp_pci.c:126: warning: ‘pci_find_slot’ is deprecated (declared at include/linux/pci.h:481)
drivers/pci/hotplug/cpqphp_pci.c: In function ‘cpqhp_save_config’:
drivers/pci/hotplug/cpqphp_pci.c:420: warning: ‘pci_find_slot’ is deprecated (declared at include/linux/pci.h:481)

Signed-off-by: Joonwoo Park <joonwpark81@gmail.com>
---
 drivers/pci/hotplug/cpqphp_pci.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
diff --git a/drivers/pci/hotplug/cpqphp_pci.c b/drivers/pci/hotplug/cpqphp_pci.c
index fc7c74d..c05d34a 100644
--- a/drivers/pci/hotplug/cpqphp_pci.c
+++ b/drivers/pci/hotplug/cpqphp_pci.c
@@ -89,7 +89,7 @@ int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func)
 	int num;
 
 	if (func->pci_dev == NULL)
-		func->pci_dev = pci_find_slot(func->bus, PCI_DEVFN(func->device, func->function));
+		func->pci_dev = pci_get_bus_and_slot(func->bus, PCI_DEVFN(func->device, func->function));
 
 	/* No pci device, we need to create it then */
 	if (func->pci_dev == NULL) {
@@ -99,7 +99,7 @@ int cpqhp_configure_device (struct controller* ctrl, struct pci_func* func)
 		if (num)
 			pci_bus_add_devices(ctrl->pci_dev->bus);
 
-		func->pci_dev = pci_find_slot(func->bus, PCI_DEVFN(func->device, func->function));
+		func->pci_dev = pci_get_bus_and_slot(func->bus, PCI_DEVFN(func->device, func->function));
 		if (func->pci_dev == NULL) {
 			dbg("ERROR: pci_dev still null\n");
 			return 0;
@@ -123,7 +123,7 @@ int cpqhp_unconfigure_device(struct pci_func* func)
 	dbg("%s: bus/dev/func = %x/%x/%x\n", __FUNCTION__, func->bus, func->device, func->function);
 
 	for (j=0; j<8 ; j++) {
-		struct pci_dev* temp = pci_find_slot(func->bus, PCI_DEVFN(func->device, j));
+		struct pci_dev *temp = pci_get_bus_and_slot(func->bus, PCI_DEVFN(func->device, j));
 		if (temp)
 			pci_remove_bus_device(temp);
 	}
@@ -417,7 +417,7 @@ int cpqhp_save_config(struct controller *ctrl, int busnumber, int is_hot_plug)
 				new_slot->switch_save = 0x10;
 				// In case of unsupported board
 				new_slot->status = DevError;
-				new_slot->pci_dev = pci_find_slot(new_slot->bus, (new_slot->device << 3) | new_slot->function);
+				new_slot->pci_dev = pci_get_bus_and_slot(new_slot->bus, (new_slot->device << 3) | new_slot->function);
 
 				for (cloop = 0; cloop < 0x20; cloop++) {
 					rc = pci_bus_read_config_dword (ctrl->pci_bus, PCI_DEVFN(device, function), cloop << 2, (u32 *) & (new_slot-> config_space [cloop]));
---

Thanks.
Joonwoo Park



             reply	other threads:[~2007-10-01  3:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-01  3:09 JoonwooPark [this message]
2007-10-01  6:10 ` Greg KH
2007-10-01  8:05 Joonwoo Park

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=1191208147.6123.11.camel@joonwpark-desktop \
    --to=joonwpark81@gmail.com \
    --cc=gregkh@suse.de \
    --cc=kristen.c.accardi@intel.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 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®