From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Linux ACPI <linux-acpi@vger.kernel.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
Hans De Goede <hdegoede@redhat.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 2/2] ACPI: scan: Adjust white space in acpi_device_add()
Date: Thu, 14 Jan 2021 19:47:37 +0100 [thread overview]
Message-ID: <8659794.ROA1lt5W1e@kreacher> (raw)
In-Reply-To: <3494203.VBaj39JGmp@kreacher>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
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 <rafael.j.wysocki@intel.com>
---
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;
}
next prev parent reply other threads:[~2021-01-14 18:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-14 18:45 [PATCH v1 0/2] ACPI: scan: Janitorial changes in acpi_device_add() Rafael J. Wysocki
2021-01-14 18:46 ` [PATCH v1 1/2] ACPI: scan: Rearrange memory allocation " Rafael J. Wysocki
2021-01-16 12:35 ` Hans de Goede
2021-01-18 15:16 ` Rafael J. Wysocki
2021-01-18 15:26 ` Hans de Goede
2021-01-18 15:32 ` Andy Shevchenko
2021-01-18 15:34 ` Hans de Goede
2021-01-14 18:47 ` Rafael J. Wysocki [this message]
2021-01-16 12:36 ` [PATCH v1 2/2] ACPI: scan: Adjust white space " Hans de Goede
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=8659794.ROA1lt5W1e@kreacher \
--to=rjw@rjwysocki.net \
--cc=andriy.shevchenko@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@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).