From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: Subject: Re: [PATCH v8 3/7] PCI: Introduce hotplug_is_native() From: Andy Shevchenko To: Mika Westerberg , Bjorn Helgaas , "Rafael J . Wysocki" Cc: Len Brown , Mario.Limonciello@dell.com, Michael Jamet , Yehezkel Bernat , Lukas Wunner , linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org Date: Tue, 29 May 2018 19:34:41 +0300 In-Reply-To: <20180528124756.78512-4-mika.westerberg@linux.intel.com> References: <20180528124756.78512-1-mika.westerberg@linux.intel.com> <20180528124756.78512-4-mika.westerberg@linux.intel.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org List-ID: On Mon, 2018-05-28 at 15:47 +0300, Mika Westerberg wrote: > This helper function can be used for finding out whether the OS is > supposed to handle native hotplug of a given bridge. > Nice simple helper. Reviewed-by: Andy Shevchenko > Signed-off-by: Mika Westerberg > --- > include/linux/pci_hotplug.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/include/linux/pci_hotplug.h b/include/linux/pci_hotplug.h > index 4c378368215c..cf5e22103f68 100644 > --- a/include/linux/pci_hotplug.h > +++ b/include/linux/pci_hotplug.h > @@ -181,4 +181,9 @@ static inline int > acpi_get_hp_hw_control_from_firmware(struct pci_dev *bridge) > static inline bool pciehp_is_native(struct pci_dev *bridge) { return > true; } > static inline bool shpchp_is_native(struct pci_dev *bridge) { return > true; } > #endif > + > +static inline bool hotplug_is_native(struct pci_dev *bridge) > +{ > + return pciehp_is_native(bridge) || shpchp_is_native(bridge); > +} > #endif -- Andy Shevchenko Intel Finland Oy