From mboxrd@z Thu Jan 1 00:00:00 1970 From: Toshi Kani Subject: Re: [PATCH rev.2 1/6] ACPI: Separate adding ACPI device objects from probing ACPI drivers Date: Tue, 18 Dec 2012 15:15:12 -0700 Message-ID: <1355868912.18964.381.camel@misato.fc.hp.com> References: <8498184.VilrUmatxI@vostro.rjw.lan> <4082842.31rfDviYHK@vostro.rjw.lan> <1355847041.18964.369.camel@misato.fc.hp.com> <3027479.MToB281uxK@vostro.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: Received: from g1t0029.austin.hp.com ([15.216.28.36]:20144 "EHLO g1t0029.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754840Ab2LRWYU (ORCPT ); Tue, 18 Dec 2012 17:24:20 -0500 In-Reply-To: <3027479.MToB281uxK@vostro.rjw.lan> Sender: linux-acpi-owner@vger.kernel.org List-Id: linux-acpi@vger.kernel.org To: "Rafael J. Wysocki" Cc: ACPI Devel Maling List , Bjorn Helgaas , LKML , linux-pci@vger.kernel.org, Yinghai Lu , Myron Stowe , Yijing Wang , Jiang Liu On Tue, 2012-12-18 at 22:57 +0100, Rafael J. Wysocki wrote: > On Tuesday, December 18, 2012 09:10:41 AM Toshi Kani wrote: > > On Tue, 2012-12-18 at 02:48 +0100, Rafael J. Wysocki wrote: : > > We need to decide which module is responsible for calling .bind(). I > > think it should be the ACPI scan module, not the ACPI PCI root bridge > > driver, because: > > - bind() needs to be called when _ADR device is added. The ACPI scan > > module can scan any devices, while the PCI root driver can only scan > > when it is added. > > - acpi_bus_remove() calls unbind() at hot-remove. The same module > > should be responsible for both bind() and unbind() handling. > > - It is cleaner to keep struct acpi_device_ops interface to be called > > by the ACPI core. > > I agree with that. :-) > > Moreover, I don't think we need acpi_pci_bind() and acpi_pci_unbind() at all. > > > So, I would propose the following changes. > > > > - Move the acpi_hot_add_bind() call back to the original place after > > the device_attach() call. > > - Rename the name of acpi_hot_add_bind() to something like > > acpi_bind_adr_device() since it is no longer hot-add only (and is > > specific to _ADR devices). > > - Create its pair function, acpi_unbind_adr_device(), which is called > > from acpi_bus_remove(). When a constructor interface is introduced, its > > destructor should be introduced as well. > > - Remove the binding procedure from acpi_pci_root_add(). This should > > be done in patch [2/6]. > > Well, what about moving the code from acpi_pci_bind()/acpi_pci_unbind() > somewhere else and removing those things altogether? Sounds nice. It will be bonus point if you can do that. :-) Thanks, -Toshi