linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: ACPI Devel Maling List <linux-acpi@vger.kernel.org>
Cc: Linux PCI <linux-pci@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Bjorn Helgaas <bhelgaas@google.com>, Tejun Heo <tj@kernel.org>,
	Aaron Lu <aaron.lu@intel.com>
Subject: [PATCH 8/9] ACPI / dock: Drop remove_dock_dependent_devices()
Date: Wed, 19 Feb 2014 02:32:12 +0100	[thread overview]
Message-ID: <3723851.WP79lXh8Px@vostro.rjw.lan> (raw)
In-Reply-To: <3011875.q18rCmXyYX@vostro.rjw.lan>

From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

Since remove_dock_dependent_devices() is only called from acpi_dock_add()
and it only is called if the add_dock_dependent_device() adding the
dock station to its own list of dependent devices has failed, it is not
really necessary, because the dock station's list of dependent devices
is guaranteed to be empty at that point.  Drop it, then.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/acpi/dock.c |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Index: linux-pm/drivers/acpi/dock.c
===================================================================
--- linux-pm.orig/drivers/acpi/dock.c
+++ linux-pm/drivers/acpi/dock.c
@@ -114,16 +114,6 @@ static int add_dock_dependent_device(str
 	return 0;
 }
 
-static void remove_dock_dependent_devices(struct dock_station *ds)
-{
-	struct dock_dependent_device *dd, *aux;
-
-	list_for_each_entry_safe(dd, aux, &ds->dependent_devices, list) {
-		list_del(&dd->list);
-		kfree(dd);
-	}
-}
-
 static void dock_hotplug_event(struct dock_dependent_device *dd, u32 event,
 			       enum dock_callback_type cb_type)
 {
@@ -674,8 +664,8 @@ void acpi_dock_add(struct acpi_device *a
 	return;
 
 err_rmgroup:
-	remove_dock_dependent_devices(dock_station);
 	sysfs_remove_group(&dd->dev.kobj, &dock_attribute_group);
+
 err_unregister:
 	platform_device_unregister(dd);
 	acpi_handle_err(handle, "%s encountered error %d\n", __func__, ret);


  parent reply	other threads:[~2014-02-19  1:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19  1:26 [PATCH 0/9] ACPI / dock / PCI / SATA: Simplify ACPI dock handling Rafael J. Wysocki
2014-02-19  1:27 ` [PATCH 1/9] ACPI / hotplug / PCI: Do not clear event callback pointer for docks Rafael J. Wysocki
2014-02-19  1:27 ` [PATCH 2/9] ACPI / hotplug: Add .fixup() callback to struct acpi_hotplug_context Rafael J. Wysocki
2014-02-19  1:28 ` [PATCH 3/9] ACPI / dock: Use ACPI device object pointers instead of ACPI handles Rafael J. Wysocki
2014-02-19  1:29 ` [PATCH 4/9] ACPI / dock: Use callback pointers from devices' ACPI hotplug contexts Rafael J. Wysocki
2014-02-19  1:30 ` [PATCH 5/9] ACPI / dock: Add .uevent() callback to struct acpi_hotplug_context Rafael J. Wysocki
2014-02-19  1:30 ` [PATCH 6/9] ACPI / ATA: Add hotplug contexts to ACPI companions of SATA devices Rafael J. Wysocki
2014-02-19  2:42   ` Aaron Lu
2014-02-19 16:40     ` Rafael J. Wysocki
2014-02-20  1:47   ` [Update][PATCH " Rafael J. Wysocki
2014-02-20  8:23     ` Aaron Lu
2014-02-20 14:26     ` Tejun Heo
2014-02-20 23:59       ` Rafael J. Wysocki
2014-02-22  0:15     ` [Update 2x][PATCH " Rafael J. Wysocki
2014-02-19  1:31 ` [PATCH 7/9] ACPI / dock: Drop struct acpi_dock_ops and all code related to it Rafael J. Wysocki
2014-02-19  1:32 ` Rafael J. Wysocki [this message]
2014-02-19  1:32 ` [PATCH 9/9] ACPI / dock: Update copyright notice Rafael J. Wysocki

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=3723851.WP79lXh8Px@vostro.rjw.lan \
    --to=rjw@rjwysocki.net \
    --cc=aaron.lu@intel.com \
    --cc=bhelgaas@google.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=tj@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).