Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp496425pxb; Thu, 14 Jan 2021 10:51:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJxezvYdgWT2ppQoUWtTM3yMOV2/06kv5Bl/WML5FDHXrqzpCnC5zCTaBvf/mYiY1kjp/USv X-Received: by 2002:a17:906:7e49:: with SMTP id z9mr2355704ejr.447.1610650299540; Thu, 14 Jan 2021 10:51:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610650299; cv=none; d=google.com; s=arc-20160816; b=vwzHgQGE99fqnpUssrP/xxYz+mNwWL3rDCsGMH5rMFjfYoPUCAhHdgrN+ILTmTlQ8u 8RBAfAudGUPX/KPl4GH01659J7NGxEC9wJ++DjZzZO5wjtl6xDfVlemSIeqi7I6Ef3pn yRd3UbMVGvS7DKojQMa25Xh189fEX3SQegoyMrBA9icLIU03X4g54DEbNgi5Yne2I3fK zT+/lWO3mpu+QVPTVWRGKRN3kklggYnulWLJPfPKvk1yMYT02AFk3LcYG5XsW1FC/15F Zdq03JVtl9jD4R57AomdEsO4gC/TimJbPbU7HbQ0Zq9TKoN1XsfRhcEZAATUgsqTFGM3 r1WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=LVI1UvNodYSMWUIM7sLOT40Luc+3G7a7XDAPnBiIpj4=; b=sd35YKkxnd1GaLfgM7kP5Pj02wvSjYhJlCoR3NStB7QgQW0ZI66CHrdqVxBrM0eT6X AsdQY1L+U+1Js1G2fxnVb/3BVewJRb572uH8BAwjwamvtRRUtv6sNmIE5Cfa4nunaaD7 bEcSoje/6xCi2Tq6Mu1zaJ+2xx5IJusL15iReuU6IFp5BsVJSq9QXAo79vkB/HW213c6 YZlrn83DKU7XggacinBvmygLvTLAG5BkvrQoZud12p5r3xeXoFJcI5djxmi3LQ2e8WAl c0LPOUG9i+HVr1dnc+INjV8m6HYvmL5O+LKGHySUWCeWMsDMcP3ql4IiwT4cRUrraUoS uQVA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lf28si2320956ejc.516.2021.01.14.10.51.15; Thu, 14 Jan 2021 10:51:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727346AbhANSsp (ORCPT + 99 others); Thu, 14 Jan 2021 13:48:45 -0500 Received: from cloudserver094114.home.pl ([79.96.170.134]:52470 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727888AbhANSsp (ORCPT ); Thu, 14 Jan 2021 13:48:45 -0500 Received: from 89-64-81-33.dynamic.chello.pl (89.64.81.33) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.537) id 5835532344c3e18a; Thu, 14 Jan 2021 19:48:03 +0100 From: "Rafael J. Wysocki" To: Linux ACPI Cc: LKML , Hans De Goede , Andy Shevchenko Subject: [PATCH v1 2/2] ACPI: scan: Adjust white space in acpi_device_add() Date: Thu, 14 Jan 2021 19:47:37 +0100 Message-ID: <8659794.ROA1lt5W1e@kreacher> In-Reply-To: <3494203.VBaj39JGmp@kreacher> References: <3494203.VBaj39JGmp@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Add empty lines in some places in acpi_device_add() to help readability and drop leading spaces before the labels in there. No functional impact. Signed-off-by: Rafael J. Wysocki --- drivers/acpi/scan.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) Index: linux-pm/drivers/acpi/scan.c =================================================================== --- linux-pm.orig/drivers/acpi/scan.c +++ linux-pm/drivers/acpi/scan.c @@ -692,10 +692,12 @@ int acpi_device_add(struct acpi_device * if (device->wakeup.flags.valid) list_add_tail(&device->wakeup_list, &acpi_wakeup_device_list); + mutex_unlock(&acpi_device_lock); if (device->parent) device->dev.parent = &device->parent->dev; + device->dev.bus = &acpi_bus_type; device->dev.release = release; result = device_add(&device->dev); @@ -711,16 +713,19 @@ int acpi_device_add(struct acpi_device * return 0; - err: +err: mutex_lock(&acpi_device_lock); + if (device->parent) list_del(&device->node); + list_del(&device->wakeup_list); - err_unlock: +err_unlock: mutex_unlock(&acpi_device_lock); acpi_detach_data(device->handle, acpi_scan_drop_device); + return result; }