From patchwork Mon Nov 11 04:56:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 179052 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp6159733ilf; Sun, 10 Nov 2019 20:57:55 -0800 (PST) X-Google-Smtp-Source: APXvYqy8xRW2U5EY9sT8pzWoCcyiYn8oJn2AiBswPTiBcILOfRn7cRMj5oJRFU+HCQ5fgn4oaUb5 X-Received: by 2002:a17:906:1c4d:: with SMTP id l13mr20631065ejg.308.1573448275207; Sun, 10 Nov 2019 20:57:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573448275; cv=none; d=google.com; s=arc-20160816; b=y0mwFyJ4DpXWmUxLheeZxQy8Zty0/EvsooIikBj/akqVmP17bmVkFr72jQRiKFUxyt bs0IuALp8mAS7IamgmHRl219wMglEd6jmnyLWoSvrqgO23+V7ju/UM2sLJoF2kU7tVHF 9+7jKrGYDSdYZn4C0/r93ho1g/EuuIQTzLnkdN7rXnw34rPnh7cNr8cVyWNenjGFarAc nEhnPeLctOvCCpnLjLnRc4Uw/H9xvApAFeAz2lQNG3iX9c7FyxleTcq1I0bG79A9qKaW zgVt7d/J2E9l+ObcPmd19DlTM4FSznyJd1wcoS41lvd3bSPEqfbRxZfDsg2em0a9eh/z DrdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Qi2I0P98O+PR3R0ElYzARgQcTgZiWJKaUe4afqd8JxM=; b=lfpLvDfinI9IYN5xg1tHBhQgVeQW9K8udrhcMu+YoHGv0/e/BjRksBdb/85BVPoE2a Ig317NjT9fXdGvp/zaDYX3m9Vk2RlpvuecioR2yMewqHgtSoRjmPlpEbSiC0OuBqccu1 UmQ0XolE0mlPupFyIcwhkmL2eC0Ik/S0KSFP1x8yQkBbd/3mTtX7j0q+atbA1liaC4KT jvahxOPSHFks6V3T7Uqbq2KAW3HF+PfdaZEJ6TtdFrRbFDzNqn4aC/3JykwGHYn5BGnn aZzZ7jTdPJb+ieX9JLWEzEahv5LJKIBQ3nzwEN23Eufjge5HZpQuocJe4kQvbgsA3opc M4YQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b15si8558180eju.362.2019.11.10.20.57.54; Sun, 10 Nov 2019 20:57:55 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726946AbfKKE4S (ORCPT + 26 others); Sun, 10 Nov 2019 23:56:18 -0500 Received: from mx2.suse.de ([195.135.220.15]:48606 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726768AbfKKE4S (ORCPT ); Sun, 10 Nov 2019 23:56:18 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id E3D15B18C; Mon, 11 Nov 2019 04:56:16 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: linux-realtek-soc@lists.infradead.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, =?utf-8?q?Andreas_F=C3=A4rber?= , Lee Jones , Bjorn Andersson , Geert Uytterhoeven , Greg Kroah-Hartman , "Rafael J. Wysocki" Subject: [PATCH] base: soc: Export soc_device_to_device() helper Date: Mon, 11 Nov 2019 05:56:09 +0100 Message-Id: <20191111045609.7026-1-afaerber@suse.de> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191103013645.9856-3-afaerber@suse.de> References: <20191103013645.9856-3-afaerber@suse.de> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use of soc_device_to_device() in driver modules causes a build failure. Given that the helper is nicely documented in include/linux/sys_soc.h, let's export it as GPL symbol. struct soc_device is local to soc.c, so it can't be inlined into the header or into driver code. This still handles only the case that CONFIG_SOC_BUS is enabled. Same as commit da65a1589dacc7ec44ea0557a14d70a39d991f32 ("base: soc: Provide a dummy implementation of soc_device_match()") we'd need to provide a dummy inline implementation to cope with COMPILE_TEST, too. Reported-by: kbuild test robot Cc: Lee Jones Cc: Bjorn Andersson Cc: Geert Uytterhoeven Signed-off-by: Andreas Färber --- drivers/base/soc.c | 1 + 1 file changed, 1 insertion(+) -- 2.16.4 diff --git a/drivers/base/soc.c b/drivers/base/soc.c index 4af11a423475..72848587cd51 100644 --- a/drivers/base/soc.c +++ b/drivers/base/soc.c @@ -41,6 +41,7 @@ struct device *soc_device_to_device(struct soc_device *soc_dev) { return &soc_dev->dev; } +EXPORT_SYMBOL_GPL(soc_device_to_device); static umode_t soc_attribute_mode(struct kobject *kobj, struct attribute *attr,