From patchwork Tue Apr 4 12:32:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 9661665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD29360364 for ; Tue, 4 Apr 2017 12:32:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D800C200E7 for ; Tue, 4 Apr 2017 12:32:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CC95F205AD; Tue, 4 Apr 2017 12:32:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_HI,RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BEAD1200E7 for ; Tue, 4 Apr 2017 12:32:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754286AbdDDMcd (ORCPT ); Tue, 4 Apr 2017 08:32:33 -0400 Received: from mail-wr0-f180.google.com ([209.85.128.180]:35209 "EHLO mail-wr0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754262AbdDDMcb (ORCPT ); Tue, 4 Apr 2017 08:32:31 -0400 Received: by mail-wr0-f180.google.com with SMTP id k6so208593623wre.2 for ; Tue, 04 Apr 2017 05:32:26 -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=9geFZIs2Nppnd+oxhYCTo9FNicTZWV2bBzjs36VWvKw=; b=UJ1cxFfewkjSmmszaF4xKNOxy4Nrxa96KPmw4TibG9mouJdhyjoaWswnyURTLmE69a tVev7waKrl2/5ndZow1Dd+PP/a/undfHmuVQPJXl4UonsY43eY56zI3WOAyU72c1mfAs QVwEJpYJxoMAiIxDraziVefwdXjBAHeb7/0Zw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=9geFZIs2Nppnd+oxhYCTo9FNicTZWV2bBzjs36VWvKw=; b=QIz/65GQJpEvo5humEhOXYUaW8+3nIaa8ys0iRiVpnmx6VQSDNfVgwo5nkGCmMKeDB vPXr6PMMWziOPT42OQ7qqasi/mWzzK4UY5Zl/VJN95cXOjD/fBZJYAJP8PEhY/tlVSMO zdBchjiHdswkqYyafUnq9L9mHndpwwksE6IN2prz7dEfAmASKUl+DubDlzfEGw2ZDGXf h3LR62W+czC3actqMqnLi2CHtAh8TDlJv1rkeRCsVaxWLOeuhBg4aaFKi/y+QdqNMNEV LuEvBFAMrBujVwIeZLYb4ejHzq0sA7xZfpAsZ/OUHZdYxPTekz+8uzbrudC0A5WYKOY7 +Dew== X-Gm-Message-State: AFeK/H0HcGy7PUoTUdtoIDNSWtbCjZvKicMHUmRr52dHeSnQdgwgKX2SMShtEl0/cqo91QjG X-Received: by 10.223.130.36 with SMTP id 33mr20523156wrb.150.1491309145286; Tue, 04 Apr 2017 05:32:25 -0700 (PDT) Received: from localhost.localdomain ([2.31.167.174]) by smtp.gmail.com with ESMTPSA id 75sm21479249wmp.2.2017.04.04.05.32.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Apr 2017 05:32:24 -0700 (PDT) From: Lee Jones To: hans.verkuil@cisco.com, mchehab@kernel.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@stlinux.com, patrice.chotard@st.com, linux-media@vger.kernel.org, benjamin.gaignard@st.com, Lee Jones Subject: [PATCH 1/2] [media] cec: Move capability check inside #if Date: Tue, 4 Apr 2017 13:32:18 +0100 Message-Id: <20170404123219.22040-1-lee.jones@linaro.org> X-Mailer: git-send-email 2.9.3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If CONFIG_RC_CORE is not enabled then none of the RC code will be executed anyway, so we're placing the capability check inside the Signed-off-by: Lee Jones --- drivers/media/cec/cec-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/cec/cec-core.c b/drivers/media/cec/cec-core.c index 37217e2..06a312c 100644 --- a/drivers/media/cec/cec-core.c +++ b/drivers/media/cec/cec-core.c @@ -234,10 +234,10 @@ struct cec_adapter *cec_allocate_adapter(const struct cec_adap_ops *ops, return ERR_PTR(res); } +#if IS_REACHABLE(CONFIG_RC_CORE) if (!(caps & CEC_CAP_RC)) return adap; -#if IS_REACHABLE(CONFIG_RC_CORE) /* Prepare the RC input device */ adap->rc = rc_allocate_device(RC_DRIVER_SCANCODE); if (!adap->rc) {