From patchwork Wed Feb 19 01:27:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rafael J. Wysocki" X-Patchwork-Id: 321718 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 1A0112C022C for ; Wed, 19 Feb 2014 12:19:38 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752400AbaBSBTA (ORCPT ); Tue, 18 Feb 2014 20:19:00 -0500 Received: from v094114.home.net.pl ([79.96.170.134]:50877 "HELO v094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1752204AbaBSBSe (ORCPT ); Tue, 18 Feb 2014 20:18:34 -0500 Received: from afek227.neoplus.adsl.tpnet.pl [95.49.114.227] (HELO vostro.rjw.lan) by serwer1319399.home.pl [79.96.170.134] with SMTP (IdeaSmtpServer v0.80) id b422e40603f4898d; Wed, 19 Feb 2014 02:18:32 +0100 From: "Rafael J. Wysocki" To: ACPI Devel Maling List Cc: Linux PCI , Linux Kernel Mailing List , Bjorn Helgaas , Tejun Heo , Aaron Lu Subject: [PATCH 2/9] ACPI / hotplug: Add .fixup() callback to struct acpi_hotplug_context Date: Wed, 19 Feb 2014 02:27:45 +0100 Message-ID: <3202096.sgetyLoJFZ@vostro.rjw.lan> User-Agent: KMail/4.11.5 (Linux/3.13.0+; KDE/4.11.5; x86_64; ; ) In-Reply-To: <3011875.q18rCmXyYX@vostro.rjw.lan> References: <3011875.q18rCmXyYX@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 From: Rafael J. Wysocki In order for the ACPI dock station code to be able to use the callbacks pointed to by the ACPI device objects' hotplug contexts add a .fixup() callback pointer to struct acpi_hotplug_context. That callback will be useful to handle PCI devices located in dock stations. Signed-off-by: Rafael J. Wysocki --- drivers/pci/hotplug/acpiphp_glue.c | 2 +- include/acpi/acpi_bus.h | 5 ++++- 2 files changed, 5 insertions(+), 2 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/include/acpi/acpi_bus.h =================================================================== --- linux-pm.orig/include/acpi/acpi_bus.h +++ linux-pm/include/acpi/acpi_bus.h @@ -146,6 +146,7 @@ struct acpi_scan_handler { struct acpi_hotplug_context { struct acpi_device *self; int (*event)(struct acpi_device *, u32); + void (*fixup)(struct acpi_device *); }; /* @@ -368,10 +369,12 @@ static inline void acpi_set_device_statu static inline void acpi_set_hp_context(struct acpi_device *adev, struct acpi_hotplug_context *hp, - int (*event)(struct acpi_device *, u32)) + int (*event)(struct acpi_device *, u32), + void (*fixup)(struct acpi_device *)) { hp->self = adev; hp->event = event; + hp->fixup = fixup; adev->hp = hp; } Index: linux-pm/drivers/pci/hotplug/acpiphp_glue.c =================================================================== --- linux-pm.orig/drivers/pci/hotplug/acpiphp_glue.c +++ linux-pm/drivers/pci/hotplug/acpiphp_glue.c @@ -80,7 +80,7 @@ static struct acpiphp_context *acpiphp_i return NULL; context->refcount = 1; - acpi_set_hp_context(adev, &context->hp, acpiphp_hotplug_event); + acpi_set_hp_context(adev, &context->hp, acpiphp_hotplug_event, NULL); return context; }