From patchwork Thu Dec 24 08:28:38 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 7915741 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 8FAD39F1AF for ; Thu, 24 Dec 2015 08:30:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AE1BE2052F for ; Thu, 24 Dec 2015 08:30:54 +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 E2F482051D for ; Thu, 24 Dec 2015 08:30:53 +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 1aC1Gk-00029B-6Q; Thu, 24 Dec 2015 08:29:06 +0000 Received: from mail-pf0-x232.google.com ([2607:f8b0:400e:c00::232]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aC1Gg-0001uj-PN for linux-arm-kernel@lists.infradead.org; Thu, 24 Dec 2015 08:29:03 +0000 Received: by mail-pf0-x232.google.com with SMTP id e65so12933361pfe.1 for ; Thu, 24 Dec 2015 00:28:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kryo-se.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=TnW3Haer1Z9cvUxY0LwTLnVWhs/JmOhUCp8VgWfSaGg=; b=iwTRsrmJ/Q4CJxf4USg/FdAwYHyI78F++qUcQ7rSIEqaOupy5YvvkEJExcydAwXOeK Ky99pHzqRmMk1ug5Mpz/xEYOYpc3gkPKX2LSn336+t0Z6BZllk5AI50c7ipQd7mUYrqE gII1k+steZGPb4TgxIA9rDy/k+SZZ2QiDehKQ5PfYYM7S/f8+jyO1ihCFo6jUFQumetJ X2jYzu3d/5SbhQph2DRUA28RAmQSDY0l3wOKFu0rvkR7WFVuvK2WGOmxjQ2DybsbdzS0 w2n15AhiD4aNlU1AlYDv7tRtSGDMksRDMlDn2MdF0rAn6UfIiHFKNsCGThkxGYmieH7a vhjw== 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=TnW3Haer1Z9cvUxY0LwTLnVWhs/JmOhUCp8VgWfSaGg=; b=Y0LG03pgySc0GrLZUssfYYp4puy8NPwvunvINg3LKmTICo/zmBpw3wyG1y+zxzAPXt TXp2N/ajhWHLbcVGIu+hkymEBnoSEIsr/ZNC/W0zN1XCsGYuJJhPqBSIbY1WxxmN3qpx bsp3uI0iHdDuF+g52UZ8gf7Lhrbve3xaekftz3NsiY1JEwTP1Tq3ruYqQroGe3IVQljy gnC0WMWVJJjCdXGJHzCaCaOR7NEGdMdOqkwvMiNmaJEWBqYN+ggsjJRoXUVCEQs2uaEC WAtvla7ydAikN2bWFRZgQcJ7cG/Z5HpmmeeYJY0rurNqlHQEH7B51vxoEqgcVxOgSebp 80Bg== X-Gm-Message-State: ALoCoQnH2dbGUHxZomGZxgGakGgtmwXaZ5KBIwOPdt2p5spNWtlT3TqCRtFjhk1IaHCnpqB8/VTc5m2CU4y17EMr2CwtXpTx6A== X-Received: by 10.98.16.26 with SMTP id y26mr49859642pfi.135.1450945721187; Thu, 24 Dec 2015 00:28:41 -0800 (PST) Received: from tuxbot.san.rr.com (cpe-76-167-68-231.natsow.res.rr.com. [76.167.68.231]) by smtp.gmail.com with ESMTPSA id g68sm15521743pfd.55.2015.12.24.00.28.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 24 Dec 2015 00:28:39 -0800 (PST) From: Bjorn Andersson X-Google-Original-From: Bjorn Andersson To: Andy Gross Subject: [PATCH] soc: qcom: smem_state: Add stubs for disabled smem_state Date: Thu, 24 Dec 2015 00:28:38 -0800 Message-Id: <1450945718-7384-1-git-send-email-bjorn.andersson@sonymobile.com> X-Mailer: git-send-email 2.5.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20151224_002902_864032_016C5963 X-CRM114-Status: UNSURE ( 9.91 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.6 (--) 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: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org 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=-4.1 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 Signed-off-by: Bjorn Andersson --- include/linux/soc/qcom/smem_state.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/include/linux/soc/qcom/smem_state.h b/include/linux/soc/qcom/smem_state.h index f35e1512fcaa..7b88697929e9 100644 --- a/include/linux/soc/qcom/smem_state.h +++ b/include/linux/soc/qcom/smem_state.h @@ -1,12 +1,17 @@ #ifndef __QCOM_SMEM_STATE__ #define __QCOM_SMEM_STATE__ +#include + +struct device_node; struct qcom_smem_state; struct qcom_smem_state_ops { int (*update_bits)(void *, u32, u32); }; +#ifdef CONFIG_QCOM_SMEM_STATE + struct qcom_smem_state *qcom_smem_state_get(struct device *dev, const char *con_id, unsigned *bit); void qcom_smem_state_put(struct qcom_smem_state *); @@ -15,4 +20,34 @@ int qcom_smem_state_update_bits(struct qcom_smem_state *state, u32 mask, u32 val struct qcom_smem_state *qcom_smem_state_register(struct device_node *of_node, const struct qcom_smem_state_ops *ops, void *data); void qcom_smem_state_unregister(struct qcom_smem_state *state); +#else + +static inline struct qcom_smem_state *qcom_smem_state_get(struct device *dev, + const char *con_id, unsigned *bit) +{ + return ERR_PTR(-EINVAL); +} + +static inline void qcom_smem_state_put(struct qcom_smem_state *state) +{ +} + +static inline int qcom_smem_state_update_bits(struct qcom_smem_state *state, + u32 mask, u32 value) +{ + return -EINVAL; +} + +static inline struct qcom_smem_state *qcom_smem_state_register(struct device_node *of_node, + const struct qcom_smem_state_ops *ops, void *data) +{ + return ERR_PTR(-EINVAL); +} + +static inline void qcom_smem_state_unregister(struct qcom_smem_state *state) +{ +} + +#endif + #endif