From patchwork Tue Jul 28 13:19:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomeu Vizoso X-Patchwork-Id: 6884861 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9BDB1C05AC for ; Tue, 28 Jul 2015 13:23:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C5723206CE for ; Tue, 28 Jul 2015 13:23:52 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 02CC82065B for ; Tue, 28 Jul 2015 13:23:52 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZK4pH-0005Om-5z; Tue, 28 Jul 2015 13:21:47 +0000 Received: from mail-wi0-x236.google.com ([2a00:1450:400c:c05::236]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZK4oU-0004ui-DF for linux-arm-kernel@lists.infradead.org; Tue, 28 Jul 2015 13:21:00 +0000 Received: by wibud3 with SMTP id ud3so159230714wib.0 for ; Tue, 28 Jul 2015 06:20:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=HdipgCJK36fxv7RCO3EGwXQAB3E107KStDswk0yHv2M=; b=vfzsne+69B4Np9LwxSfSf3P9Gdm8pszegSrHjonih1q/e4H3XMLfFBe9OL7aPcQJE9 4ukJvdDClIWtvObYmz0xfJQ6L9aevN108Qpsa4m4xcwgCoKG8H+j3T7ZhziujgCQO5mi l3K21pymXTn7i4CijKe3dkjumobYEYpe2t1EwL4cnwokroLozQ/5i/SbK5SYY1ZB+2IM bbIbXcoEBzjUUaohyzRRm1aQ/JVdlQl6sGizeNuiS7RunxLJ1X0SpQe7nHOTYiPccPb7 E/ulYtUM5dx1nfgE5pnH5J2W0ER74A/MahA0OhgjUanQy8olu0ooP/i0cUuELqHHwf5+ KHeg== X-Received: by 10.194.82.167 with SMTP id j7mr65672388wjy.123.1438089642072; Tue, 28 Jul 2015 06:20:42 -0700 (PDT) Received: from cizrna.lan ([109.72.12.179]) by smtp.gmail.com with ESMTPSA id h9sm33265696wjx.20.2015.07.28.06.20.40 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Jul 2015 06:20:41 -0700 (PDT) From: Tomeu Vizoso To: linux-kernel@vger.kernel.org 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150728_062058_794127_FBCE8A15 X-CRM114-Status: GOOD ( 12.89 ) X-Spam-Score: -2.4 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-acpi@vger.kernel.org, Arnd Bergmann , Stephen Warren , Linus Walleij , Dmitry Torokhov , "Rafael J. Wysocki" , Tomeu Vizoso , Javier Martinez Canillas , Mark Brown , Thierry Reding , linux-arm-kernel@lists.infradead.org, Len Brown MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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;