From patchwork Fri May 6 14:09:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 67280 Delivered-To: patch@linaro.org Received: by 10.140.92.199 with SMTP id b65csp340371qge; Fri, 6 May 2016 07:09:15 -0700 (PDT) X-Received: by 10.98.89.71 with SMTP id n68mr9111568pfb.82.1462543755468; Fri, 06 May 2016 07:09:15 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id td3si18605206pac.24.2016.05.06.07.09.14; Fri, 06 May 2016 07:09:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757923AbcEFOJN (ORCPT + 8 others); Fri, 6 May 2016 10:09:13 -0400 Received: from mail-pa0-f44.google.com ([209.85.220.44]:34725 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757430AbcEFOJM (ORCPT ); Fri, 6 May 2016 10:09:12 -0400 Received: by mail-pa0-f44.google.com with SMTP id r5so49257578pag.1 for ; Fri, 06 May 2016 07:09:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=pgstBQfwzWly2i0FINq801gdzIsLTOx5jxopW4heesQ=; b=TT+3IcREYEiQEUPGjN6NHvGyOyoP0J+fHA94s2YPuA67G4JgDSU6+mzbCkXoePx9Hp bFjavpWWh29/wOxiYLNR6FbmPg7fso3wndngOtM/AjYtM6kpcVKjB4vVKlNURRM4of5t BWRW28OsodTTT2VhcNGTchOicbNQvuG+tcM1Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=pgstBQfwzWly2i0FINq801gdzIsLTOx5jxopW4heesQ=; b=Ul+lwUSv4adaYl6P+tdQeC/F++PVv3UW+oy+dwJ2l3KiGNSrdarwycOu8BlLD7F1aA sR0v3ohnYtHsyHca8msngTUsPZQfL0YlzlL67PqW6CFrvJgBH8V0E0ZM63+hSDzDqFI1 fVE/AJg2UabwsMBoSRyDJeUYTOmt+xCh/vme8XCdjxbSSjFEzTfWdxdISzT86Ax1cQK5 Ql2UAbOduH+RvNv56xYRLqHCXkVtxlOtDx8fQLxWggKbsY3YNiQFRAxQrEbWf+bRTSxU kdSKlo+p1zNJnjSWAjECI1+rb6mF2CZa7z3wxCW+TipLCdvaOUhzcXNQjbPzI9WMI7Uy HAvA== X-Gm-Message-State: AOPr4FUVSjfasyj3JtidcW7QkqLyF1ESJ00O9VusBFc4h5b+h3PldPa2heaq6UGIqBi0UKCk X-Received: by 10.66.43.143 with SMTP id w15mr29414558pal.76.1462543751462; Fri, 06 May 2016 07:09:11 -0700 (PDT) Received: from localhost.localdomain (ip68-111-223-48.sd.sd.cox.net. [68.111.223.48]) by smtp.gmail.com with ESMTPSA id h16sm19866021pfj.0.2016.05.06.07.09.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 May 2016 07:09:10 -0700 (PDT) From: Bjorn Andersson To: "David S. Miller" , Andy Gross Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org, Courtney Cavin Subject: [PATCH v4 1/2] soc: qcom: smd: Introduce compile stubs Date: Fri, 6 May 2016 07:09:07 -0700 Message-Id: <1462543748-29187-1-git-send-email-bjorn.andersson@linaro.org> X-Mailer: git-send-email 2.5.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Introduce compile stubs for the SMD API, allowing consumers to be compile tested. Acked-by: Andy Gross Signed-off-by: Bjorn Andersson --- Changes since v3: - None Changes since v2: - Introduce this patch, to allow compile testing of QRTR_SMD include/linux/soc/qcom/smd.h | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) -- 2.5.0 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/include/linux/soc/qcom/smd.h b/include/linux/soc/qcom/smd.h index d0cb6d189a0a..46a984f5e3a3 100644 --- a/include/linux/soc/qcom/smd.h +++ b/include/linux/soc/qcom/smd.h @@ -45,13 +45,39 @@ struct qcom_smd_driver { int (*callback)(struct qcom_smd_device *, const void *, size_t); }; +#if IS_ENABLED(CONFIG_QCOM_SMD) + int qcom_smd_driver_register(struct qcom_smd_driver *drv); void qcom_smd_driver_unregister(struct qcom_smd_driver *drv); +int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len); + +#else + +static inline int qcom_smd_driver_register(struct qcom_smd_driver *drv) +{ + return -ENXIO; +} + +static inline void qcom_smd_driver_unregister(struct qcom_smd_driver *drv) +{ + /* This shouldn't be possible */ + WARN_ON(1); +} + +static inline int qcom_smd_send(struct qcom_smd_channel *channel, + const void *data, int len) +{ + /* This shouldn't be possible */ + WARN_ON(1); + return -ENXIO; +} + +#endif + #define module_qcom_smd_driver(__smd_driver) \ module_driver(__smd_driver, qcom_smd_driver_register, \ qcom_smd_driver_unregister) -int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len); #endif