Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754860AbbG1NUq (ORCPT ); Tue, 28 Jul 2015 09:20:46 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:36421 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753307AbbG1NUn (ORCPT ); Tue, 28 Jul 2015 09:20:43 -0400 From: Tomeu Vizoso To: linux-kernel@vger.kernel.org Cc: Stephen Warren , Javier Martinez Canillas , Mark Brown , Thierry Reding , "Rafael J. Wysocki" , linux-arm-kernel@lists.infradead.org, Dmitry Torokhov , devicetree@vger.kernel.org, Linus Walleij , linux-acpi@vger.kernel.org, Arnd Bergmann , Tomeu Vizoso , Len Brown Subject: [PATCH v2 05/22] ACPI: add acpi_dev_get_device() Date: Tue, 28 Jul 2015 15:19:36 +0200 Message-Id: <1438089593-7696-6-git-send-email-tomeu.vizoso@collabora.com> X-Mailer: git-send-email 2.4.3 In-Reply-To: <1438089593-7696-1-git-send-email-tomeu.vizoso@collabora.com> References: <1438089593-7696-1-git-send-email-tomeu.vizoso@collabora.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1378 Lines: 48 This function is just a getter for struct acpi_device.dev and is needed in the implementation of the fwnode API when building with !CONFIG_ACPI. Signed-off-by: Tomeu Vizoso --- Changes in v2: - Add acpi_dev_get_device() include/linux/acpi.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 01e6770d8e27..d1ad6c20c7e4 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h @@ -78,6 +78,11 @@ static inline void acpi_preset_companion(struct device *dev, ACPI_COMPANION_SET(dev, acpi_find_child_device(parent, addr, NULL)); } +static inline struct device *acpi_dev_get_device(struct acpi_device *adev) +{ + return &adev->dev; +} + static inline const char *acpi_dev_name(struct acpi_device *adev) { return dev_name(&adev->dev); @@ -476,6 +481,11 @@ static inline bool has_acpi_companion(struct device *dev) return false; } +static inline struct device *acpi_dev_get_device(struct acpi_device *adev) +{ + return NULL; +} + static inline const char *acpi_dev_name(struct acpi_device *adev) { return NULL; -- 2.4.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/