From patchwork Fri Feb 26 15:25:17 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8438431 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A2D94C0553 for ; Fri, 26 Feb 2016 15:26:26 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CE516203B7 for ; Fri, 26 Feb 2016 15:26:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 01807203B1 for ; Fri, 26 Feb 2016 15:26:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932820AbcBZP0H (ORCPT ); Fri, 26 Feb 2016 10:26:07 -0500 Received: from mout.kundenserver.de ([212.227.126.133]:56838 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753895AbcBZP0H (ORCPT ); Fri, 26 Feb 2016 10:26:07 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue004) with ESMTPA (Nemesis) id 0MR97T-1aUX9U3cf1-00Uepv; Fri, 26 Feb 2016 16:25:35 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] saa7134: fix warning with !MEDIA_CONTROLLER Date: Fri, 26 Feb 2016 16:25:17 +0100 Message-Id: <1456500332-2565063-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:OqM9JoM1NzqNVHdFcsmLKplCWcprIuRfr5hSrlaDBd6PDxMHyHn wsFDaCPzpFyn3NV4Ls7v9HfEZrzPTfzFf43urxYmcox5wlsoo5YojpkkWWaQSRxIM+idSjp qYBGhc3Wm99c1q2JoN2ChY6N8qHOa7Q2OgjZ+cLOFbXqV9piTCz6zuAo9P/+mhbXcra5v7u vlHO3snbZputDDEaw2QBQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:C1Quty1IPzI=:37v1AghjeBHxgJMMZixjBF 7RDNcV9rfOXkWhDXAuGUC5OKX8U2WIKohWIPMEIzTf2RQiQQAlXmICQYj7F8q84jdzVmnf7XC qzyFEiK20GSdrLBDFvX+pnp9shwDCYSZrWsoFInNa4KQ6Kf/WrQ5Y2gMuGBKH+tOYifIEg4dn 8gUgIWSfouHcCwp4qGp59MYxy7YnwtWbQofUK9jrqOyN6hreZg91L4hdfr15cUT9bxN051YNN MOiJdQfSIFQFKrPZ0/5Lv2wRSukWFUiWvixHZahLqC6oU/bkDD4a0WhqVId9Lwe8J3gt5irkU tEwWUfz0QuozxiPhgmaZ8aa1I35hiK1mpQIWVrTlnv4KkshVEnBAU3ddrAoYYMlFfxHkhrOXE 4h9lGeB2rXe9IWpnLoJYpYTVtplPFWX+1Eh4jIbghhYsV/AZ7tK2MVQVEOCXzNkGtTTm1kq4/ zva4Q5shzixd1wVdDWcyX6a/T9ofRG3RsZrNZB2za9GMBVZGIKQY5KyTaxslx9rl7UZzKPsPQ Lw0ExSz29RxEtGZeTfpiF9T/p7RHQ0117lURkVIpIrvF3rOxzEXIjPJU/VkIgPk1Nc/rc4Mmk s7bVfrFnNkL2AGQHZ0L+ljYQ3Z86+BGfJjmRfBH3W3BawN6peFxllFX6tqRgEkd3THPKteH1B /LrQLMkvTFRSNbM4hPXTcFRAUvDys+l9qJjSUwG22FYUtr9Fbkn95/Z2RkHVbHo5thXM= Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 When CONFIG_MEDIA_CONTROLLER is disabled, we get a warning about an unused function: drivers/media/pci/saa7134/saa7134-core.c:832:13: error: 'saa7134_create_entities' defined but not used [-Werror=unused-function] This moves the #ifdef outside of the function, as it is never called here. Signed-off-by: Arnd Bergmann Fixes: ac90aa02d5b9 ("[media] saa7134: add media controller support") --- drivers/media/pci/saa7134/saa7134-core.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c index 42bc4172febd..9c7876bff7c3 100644 --- a/drivers/media/pci/saa7134/saa7134-core.c +++ b/drivers/media/pci/saa7134/saa7134-core.c @@ -829,9 +829,9 @@ static void saa7134_media_release(struct saa7134_dev *dev) #endif } +#if defined(CONFIG_MEDIA_CONTROLLER) static void saa7134_create_entities(struct saa7134_dev *dev) { -#if defined(CONFIG_MEDIA_CONTROLLER) int ret, i; struct media_entity *entity; struct media_entity *decoder = NULL; @@ -950,8 +950,8 @@ static void saa7134_create_entities(struct saa7134_dev *dev) if (ret < 0) pr_err("failed to register input entity %d!\n", i); } -#endif } +#endif static struct video_device *vdev_init(struct saa7134_dev *dev, struct video_device *template,