[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4764721.0I4yXO61da@vostro.rjw.lan>
Date: Mon, 04 Nov 2013 01:41:30 +0100
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: ACPI Devel Maling List <linux-acpi@...r.kernel.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Linux PCI <linux-pci@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
Toshi Kani <toshi.kani@...com>, Yinghai Lu <yinghai@...nel.org>
Subject: [PATCH on top of 3/3] ACPI / hotplug: Remove unnecessary get_device() and put_device()
From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
The get_device() and put_device() calls made by acpi_bus_device_eject()
and acpi_scan_hot_remove(), respectively, are not necessary any more,
so remove them.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
---
Actually, after https://patchwork.kernel.org/patch/3134091/ the
get_device() and put_device() calls may be dropped just fine.
Thanks,
Rafael
---
drivers/acpi/scan.c | 5 -----
1 file changed, 5 deletions(-)
Index: linux-pm/drivers/acpi/scan.c
===================================================================
--- linux-pm.orig/drivers/acpi/scan.c
+++ linux-pm/drivers/acpi/scan.c
@@ -205,7 +205,6 @@ static int acpi_scan_hot_remove(struct a
/* If there is no handle, the device node has been unregistered. */
if (!handle) {
dev_dbg(&device->dev, "ACPI handle missing\n");
- put_device(&device->dev);
return -EINVAL;
}
@@ -226,7 +225,6 @@ static int acpi_scan_hot_remove(struct a
dev_warn(errdev, "Offline disabled.\n");
acpi_walk_namespace(ACPI_TYPE_ANY, handle, ACPI_UINT32_MAX,
acpi_bus_online, NULL, NULL, NULL);
- put_device(&device->dev);
return -EPERM;
}
acpi_bus_offline(handle, 0, (void *)false, (void **)&errdev);
@@ -245,7 +243,6 @@ static int acpi_scan_hot_remove(struct a
acpi_walk_namespace(ACPI_TYPE_ANY, handle,
ACPI_UINT32_MAX, acpi_bus_online,
NULL, NULL, NULL);
- put_device(&device->dev);
return -EBUSY;
}
}
@@ -256,7 +253,6 @@ static int acpi_scan_hot_remove(struct a
acpi_bus_trim(device);
/* Device node has been unregistered. */
- put_device(&device->dev);
device = NULL;
acpi_evaluate_lck(handle, 0);
@@ -310,7 +306,6 @@ static void acpi_bus_device_eject(acpi_h
if (handler->hotplug.mode == AHM_CONTAINER)
kobject_uevent(&device->dev.kobj, KOBJ_OFFLINE);
- get_device(&device->dev);
error = acpi_scan_hot_remove(device);
if (error == -EPERM) {
goto err_support;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists