From patchwork Mon Nov 4 00:41:30 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 3134201 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A5CC3BEEB2 for ; Mon, 4 Nov 2013 00:29:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DA89020498 for ; Mon, 4 Nov 2013 00:29:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E8382202F7 for ; Mon, 4 Nov 2013 00:29:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751225Ab3KDA3P (ORCPT ); Sun, 3 Nov 2013 19:29:15 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:60197 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1750805Ab3KDA3P (ORCPT ); Sun, 3 Nov 2013 19:29:15 -0500 Received: from afjm202.neoplus.adsl.tpnet.pl [95.49.246.202] (HELO vostro.rjw.lan) by serwer1319399.home.pl [79.96.170.134] with SMTP (IdeaSmtpServer v0.80) id 2f7c049a3369fb38; Mon, 4 Nov 2013 01:29:13 +0100 From: "Rafael J. Wysocki" To: ACPI Devel Maling List Cc: LKML , Linux PCI , Bjorn Helgaas , Toshi Kani , Yinghai Lu Subject: [PATCH on top of 3/3] ACPI / hotplug: Remove unnecessary get_device() and put_device() Date: Mon, 04 Nov 2013 01:41:30 +0100 Message-ID: <4764721.0I4yXO61da@vostro.rjw.lan> User-Agent: KMail/4.10.5 (Linux/3.12.0-rc6+; KDE/4.10.5; x86_64; ; ) In-Reply-To: <5913958.7oJcoqqQ9l@vostro.rjw.lan> References: <5839747.7HXXGHmMBd@vostro.rjw.lan> <5913958.7oJcoqqQ9l@vostro.rjw.lan> MIME-Version: 1.0 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafael J. Wysocki 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 --- 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(-) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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;