From: Yinghai Lu <yinghai@kernel.org>
To: Bjorn Helgaas <bhelgaas@google.com>, Len Brown <lenb@kernel.org>
Cc: linux-pci@vger.kernel.org, Yinghai Lu <yinghai@kernel.org>,
linux-acpi@vger.kernel.org
Subject: [PATCH 08/29] PCI, ACPI: Remove acpi_find_bridge_device for acpi_bus_type
Date: Tue, 25 Sep 2012 01:26:09 -0700 [thread overview]
Message-ID: <1348561590-28067-9-git-send-email-yinghai@kernel.org> (raw)
In-Reply-To: <1348561590-28067-1-git-send-email-yinghai@kernel.org>
Now all acpi_bus_typs definitions have bus assigned, so remove not needed code.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Len Brown <lenb@kernel.org>
Cc: linux-acpi@vger.kernel.org
---
drivers/acpi/glue.c | 20 ++------------------
1 files changed, 2 insertions(+), 18 deletions(-)
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 3079634..db6b625 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -72,22 +72,6 @@ static struct acpi_bus_type *acpi_get_bus_type(struct bus_type *type)
return ret;
}
-static int acpi_find_bridge_device(struct device *dev, acpi_handle * handle)
-{
- struct acpi_bus_type *tmp;
- int ret = -ENODEV;
-
- down_read(&bus_type_sem);
- list_for_each_entry(tmp, &bus_type_list, list) {
- if (tmp->find_bridge && !tmp->find_bridge(dev, handle)) {
- ret = 0;
- break;
- }
- }
- up_read(&bus_type_sem);
- return ret;
-}
-
/* Get device's handler per its address under its parent */
struct acpi_find_child {
acpi_handle handle;
@@ -211,10 +195,10 @@ static int acpi_platform_notify(struct device *dev)
int ret = -EINVAL;
if (!dev->bus) {
- /* bridge devices genernally haven't bus */
- ret = acpi_find_bridge_device(dev, &handle);
+ DBG("No bus is set for %s\n", dev_name(dev));
goto end;
}
+
type = acpi_get_bus_type(dev->bus);
if (!type) {
DBG("No ACPI bus support for %s\n", dev_name(dev));
--
1.7.7
next prev parent reply other threads:[~2012-09-25 8:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1348561590-28067-1-git-send-email-yinghai@kernel.org>
2012-09-25 8:26 ` [PATCH 07/29] PCI, ACPI: add acpi_bus_type for host bridge Yinghai Lu
2012-09-25 8:26 ` Yinghai Lu [this message]
2012-09-25 8:26 ` [PATCH 11/29] PCI, ACPI: remove find_bridge in acpi_bus_type Yinghai Lu
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=1348561590-28067-9-git-send-email-yinghai@kernel.org \
--to=yinghai@kernel.org \
--cc=bhelgaas@google.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-pci@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;
as well as URLs for NNTP newsgroup(s).