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: 96721 Delivered-To: patch@linaro.org Received: by 10.140.89.233 with SMTP id v96csp171271qgd; Tue, 4 Apr 2017 05:32:34 -0700 (PDT) X-Received: by 10.98.84.194 with SMTP id i185mr22508961pfb.234.1491309153963; Tue, 04 Apr 2017 05:32:33 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u24si17395908pfa.270.2017.04.04.05.32.33; Tue, 04 Apr 2017 05:32:33 -0700 (PDT) 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; dkim=pass header.i=@linaro.org; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754244AbdDDMca (ORCPT + 25 others); Tue, 4 Apr 2017 08:32:30 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:35849 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753993AbdDDMc1 (ORCPT ); Tue, 4 Apr 2017 08:32:27 -0400 Received: by mail-wr0-f176.google.com with SMTP id w11so211135546wrc.3 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=Rr5bOm1xux6bKXlw0xTm53UU5EXDYCg4cIOZ8N+70sc37QwKwXFXeZ1M1ts6GFDjgJ ppJ8cx2FaLotvJdSA4HbgYlRJb4MTwIttg+NyY0i+y9wSfLkW2KwZf39D5x3XglAe//Z HGNiMVRBmseh6w06cAGfpaOh/pk3f7WOYwJppNbqv5Gy1ubK29XHIpKWXteSh4oi7vHJ ES0rNzoF7SI1fXHTLvNPZYfkvn+dt8QIMZTLgNt/wgOCqox8wBIr83yiSliumMfrWJF6 DKcOAsjIINKXdhCQwJaGc5lAjwFqkvAWuo0wX9MlAomlf6PzXrUCpKUaznoPZ5B5mfdv +gUw== X-Gm-Message-State: AFeK/H1e7TQ2/nFN7QJEwtTHsr+Rl6LxicraKlHyyNTL0SO7L7sfIkQTsPD58/AScBVDA9Je 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-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) -- 2.9.3 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) {