From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: linux-acpi@vger.kernel.org
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org,
Yinghai Lu <yinghai@kernel.org>, Jiang Liu <liuj97@gmail.com>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>
Subject: [PATCH] PCI / hotplug / ACPI: Get rid of check_sub_bridges()
Date: Sat, 13 Jul 2013 20:09:59 +0300 [thread overview]
Message-ID: <1373735399-28055-1-git-send-email-mika.westerberg@linux.intel.com> (raw)
Now that acpiphp_check_bridge() always enumerates devices behind the
bridge, there is no need to do that for each sub-bridge anymore like it is
done in the current ACPI-based PCI hotplug code. Given this we don't need
check_sub_bridges() anymore and can drop the function completely.
This also simplifies the ACPIPHP code a bit.
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
---
This applies on top of v3.10 with Rafael's ACPIPHP + Thunderbolt series
applied:
http://www.spinics.net/lists/linux-acpi/msg44480.html
drivers/pci/hotplug/acpiphp_glue.c | 25 -------------------------
1 file changed, 25 deletions(-)
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index 62e09af..741504a 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -760,25 +760,6 @@ static void acpiphp_sanitize_bus(struct pci_bus *bus)
* ACPI event handlers
*/
-static acpi_status
-check_sub_bridges(acpi_handle handle, u32 lvl, void *context, void **rv)
-{
- struct acpiphp_bridge *bridge;
- char objname[64];
- struct acpi_buffer buffer = { .length = sizeof(objname),
- .pointer = objname };
-
- bridge = acpiphp_handle_to_bridge(handle);
- if (bridge) {
- acpi_get_name(handle, ACPI_FULL_PATHNAME, &buffer);
- dbg("%s: re-enumerating slots under %s\n",
- __func__, objname);
- acpiphp_check_bridge(bridge);
- put_bridge(bridge);
- }
- return AE_OK ;
-}
-
void acpiphp_check_host_bridge(acpi_handle handle)
{
struct acpiphp_bridge *bridge;
@@ -788,9 +769,6 @@ void acpiphp_check_host_bridge(acpi_handle handle)
acpiphp_check_bridge(bridge);
put_bridge(bridge);
}
-
- acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
- ACPI_UINT32_MAX, check_sub_bridges, NULL, NULL, NULL);
}
static void hotplug_event(acpi_handle handle, u32 type, void *data)
@@ -818,9 +796,6 @@ static void hotplug_event(acpi_handle handle, u32 type, void *data)
dbg("%s: re-enumerating slots under %s\n", __func__, objname);
if (bridge) {
acpiphp_check_bridge(bridge);
- acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
- ACPI_UINT32_MAX, check_sub_bridges,
- NULL, NULL, NULL);
} else {
struct acpiphp_slot *slot = func->slot;
--
1.8.3.2
next reply other threads:[~2013-07-13 17:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-13 17:09 Mika Westerberg [this message]
2013-07-13 21:47 ` [PATCH] PCI / hotplug / ACPI: Get rid of check_sub_bridges() Rafael J. Wysocki
2013-07-14 7:08 ` Mika Westerberg
2013-07-14 15:12 ` Rafael J. Wysocki
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=1373735399-28055-1-git-send-email-mika.westerberg@linux.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=bhelgaas@google.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=rafael.j.wysocki@intel.com \
--cc=yinghai@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