From patchwork Sat Mar 5 00:06:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 8508501 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 2F8AAC0553 for ; Sat, 5 Mar 2016 00:07:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 184222026C for ; Sat, 5 Mar 2016 00:07:32 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0FEC32024D for ; Sat, 5 Mar 2016 00:07:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760605AbcCEAHF (ORCPT ); Fri, 4 Mar 2016 19:07:05 -0500 Received: from mout.kundenserver.de ([212.227.126.187]:55534 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760533AbcCEAHD (ORCPT ); Fri, 4 Mar 2016 19:07:03 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue003) with ESMTPA (Nemesis) id 0MXkt1-1aPfpK3GQ3-00WpQK; Sat, 05 Mar 2016 01:06:53 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Arnd Bergmann , Shuah Khan , Hans Verkuil , =?UTF-8?q?Rafael=20Louren=C3=A7o=20de=20Lima=20Chehab?= , Javier Martinez Canillas , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] hide unused functions for !MEDIA_CONTROLLER Date: Sat, 5 Mar 2016 01:06:43 +0100 Message-Id: <1457136410-2234001-1-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 X-Provags-ID: V03:K0:WPsL1WkGK911MSTA75L73GTr6m91gKkddZ/XZEpbw4BwAqamwmG zzZfV6Z7/oKV6U0euQNdL/X0FiyYrtXPP/8pkc6QqvZ4UYblEfVG9Usi9B0m0L/zSJaQphx Jib1kI/+c833P+7TrCTKeT5pr02JhiPg5Rd36X+o1YGCfs5xcOPkTH4jL2rCnPlRrTK5fmE y34jsamAy/m8n1zA9S5Mg== X-UI-Out-Filterresults: notjunk:1; V01:K0:Iwyi15RpgxQ=:2I90ICftT+Bci3wAi9y+jy M2PvgK4iU2T0ny4t3vlaGLdamaYf2pIHkd6DPM/9arg+Iadv+lkKonDGJCWtejoj6pDHIEvSp uwUxfeAF9JR3+ycMaD86i8FMOeUUdPfi9SVuNn3PgzXFEBs4g4QKLObm8JJKMGguYzYJuGrKM AfHQbXXoTqoIi4WiVOcSKD1sUfQTj/86IQvyRFFiIB00W1u8SvYwHi+ABKr7dwgFTcDaMII5N u0Epk0TU+zuI5xHf1go7tweNGY2GWcBkxWIQe3uM4i12G8cDHjS/L4qDLXb3IadZOtKSGv/Gv L3Fl1i2Li08A9lbJVvxP1d+bwlJJaToRNzniEULM740smf/CTl6vM19t62+F0hOOrgm0bp8UP Oi7pmpXd6rCypvD0OpZXm2aOA3yTtkhvsMLwGmCVx8JFBGRHyEMiCTbWyjsJzQQXOV09FvwQa 4vM7mKIM4HVeeomB4VaPIRPbIb6Bcgzqj/k7hQAMuHLE0KHCOUm9jcpFlcVU20V1ziE0SaOdf QkcJvCL2Hab0W+BUWWOCA/MV3iEESHpzzbJnPTBbyoOnDZBdTR+wCc0j/Ebm3oWPfRILzKKT+ CsJIt266bK9iVkmGnGZ8t8pSxD65uVJPBMYPelWApuWdzUqB4iyCCpAi3v1mhNdUxJBkAXKjw HpEggwlIvARINu/xZ0D32OF2RktJgYmOPOSbTQy1yiYm7v9b2/YTvTfhxdsORkS4ABjQ= 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 Some functions in the au0828 driver are only used when CONFIG_MEDIA_CONTROLLER is enabled, and otherwise defined as empty functions: media/usb/au0828/au0828-core.c:208:13: error: 'au0828_media_graph_notify' defined but not used [-Werror=unused-function] media/usb/au0828/au0828-core.c:262:12: error: 'au0828_enable_source' defined but not used [-Werror=unused-function] media/usb/au0828/au0828-core.c:412:13: error: 'au0828_disable_source' defined but not used [-Werror=unused-function] This moves the #ifdef so the entire definitions are hidden in this case. Signed-off-by: Arnd Bergmann --- drivers/media/usb/au0828/au0828-core.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c index 4ffaa3b2e905..d312098720a8 100644 --- a/drivers/media/usb/au0828/au0828-core.c +++ b/drivers/media/usb/au0828/au0828-core.c @@ -205,10 +205,10 @@ static int au0828_media_device_init(struct au0828_dev *dev, return 0; } +#ifdef CONFIG_MEDIA_CONTROLLER static void au0828_media_graph_notify(struct media_entity *new, void *notify_data) { -#ifdef CONFIG_MEDIA_CONTROLLER struct au0828_dev *dev = (struct au0828_dev *) notify_data; int ret; struct media_entity *entity, *mixer = NULL, *decoder = NULL; @@ -256,13 +256,11 @@ create_link: dev_err(&dev->usbdev->dev, "Mixer Pad Link Create Error: %d\n", ret); } -#endif } static int au0828_enable_source(struct media_entity *entity, struct media_pipeline *pipe) { -#ifdef CONFIG_MEDIA_CONTROLLER struct media_entity *source, *find_source; struct media_entity *sink; struct media_link *link, *found_link = NULL; @@ -405,13 +403,11 @@ end: pr_debug("au0828_enable_source() end %s %d %d\n", entity->name, entity->function, ret); return ret; -#endif return 0; } static void au0828_disable_source(struct media_entity *entity) { -#ifdef CONFIG_MEDIA_CONTROLLER int ret = 0; struct media_device *mdev = entity->graph_obj.mdev; struct au0828_dev *dev; @@ -453,8 +449,8 @@ static void au0828_disable_source(struct media_entity *entity) end: mutex_unlock(&mdev->graph_mutex); -#endif } +#endif static int au0828_media_device_register(struct au0828_dev *dev, struct usb_device *udev)