From patchwork Thu Feb 2 11:34:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9551615 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 37C3460405 for ; Thu, 2 Feb 2017 11:35:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 18F522839C for ; Thu, 2 Feb 2017 11:35:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0D87F283F1; Thu, 2 Feb 2017 11:35:50 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 9306B2839C for ; Thu, 2 Feb 2017 11:35:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751370AbdBBLfa (ORCPT ); Thu, 2 Feb 2017 06:35:30 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:57227 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751057AbdBBLf3 (ORCPT ); Thu, 2 Feb 2017 06:35:29 -0500 Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0Lgpny-1c5AJD2S5W-00oCRN; Thu, 02 Feb 2017 12:34:41 +0100 From: Arnd Bergmann To: Mauro Carvalho Chehab Cc: Arnd Bergmann , Greg Kroah-Hartman , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, Stephen Warren , Lee Jones , Eric Anholt , linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH] [media] staging: bcm2835: mark all symbols as 'static' Date: Thu, 2 Feb 2017 12:34:11 +0100 Message-Id: <20170202113436.690145-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:oeIZZX+opNTAMG9a3FCiCA5W3L6ql9vXDHlHwC8lNjZYSxjnbIe JqI1+HZbRbCpLd9q52ytrH6KTss+UVJ+ElWoHKrAxk2ouYHwp1trZv0UgWOPX/3HYeqXIvU Ywl/e/gY0C2+/h2PWfKbI9hwMwXQcliauU/RFXZzlWkLQNTVe0ngsNIb4UuE5WwBYYp8PDo gkLxdibsgPX5yZ1VxeoXg== X-UI-Out-Filterresults: notjunk:1; V01:K0:oIedKfKw2ak=:ioXKxvgeakMDdVea6/FhL8 dmzqYp+AjjmJeaQIFk1nYF8vGNi7gqyaLAj6sB6hmHtJJd3bfUxXsbUz4muXtT4ZHUWE8JM3E RzEBAFoG5ihL4Xc2/kYRHi1FW7g1LRpEq6X81kdmDzhg+7suPeFqb/ZtFALMU52QSQ9THgLY9 X7TUJvrbP/gPcV6GSHsz3ZtnwN8Rfvu2mn+fjkX8Nmeo7acieq42k9jgdoee6WW8JmmC+Vuej iDdQmQtJLN2M0UG04tfThAwruTEnYH2uLDQdy5myVwjIFgeNDNVqRxLmE0+0DQVtjhQyBzyMt GSgr3HjCjpyXXy95xRdXO2rdZkYF9ZBgD1IfPDlH2QRJUV8njEEZG5CY+RqtriHJmUvXijmrp n+0HqlTDjOYeAJWPZmai2m18u9k33wqPze1eQ1CZzZb75VVYrlrOgSQyD6wA7DMc/NnWbscNv Q0EasnBgsFnWuiyFbEZ6bIuTei/D2CDsfq+OGQWgxHianrkUQT9tod3vj+e58XhQXJyVT+4U9 vGoIp+h3YmhAZ/oJOoJkRXm1mKFI1IlVEIuLZCqV8gMMdmeklXpJDzRPsRyspUCtg8k0rfvLu 4Nq0lzzMPb2QLLKvauX/ezZh0BcUVzeWnjCUZYcHDIbQxq0i8aPiY7Tt6k4AIJElrZ/K7mvVX Cx371ip4UG///nQCJ3Ux0skJbEv1+NGjL6zGYRVdmd6efwJ6XhvdVJ5xJdUl7QTLFc38= 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 I got a link error in allyesconfig: drivers/staging/media/platform/bcm2835/bcm2835-camera.o: In function `vidioc_enum_framesizes': bcm2835-camera.c:(.text.vidioc_enum_framesizes+0x0): multiple definition of `vidioc_enum_framesizes' drivers/media/platform/vivid/vivid-vid-cap.o:vivid-vid-cap.c:(.text.vidioc_enum_framesizes+0x0): first defined here While both drivers are equally at fault for this problem, the bcm2835 one was just added and is easier to fix, as it is only one file, and none of its symbols need to be globally visible. This marks the three global symbols as static. Fixes: 7b3ad5abf027 ("staging: Import the BCM2835 MMAL-based V4L2 camera driver.") Signed-off-by: Arnd Bergmann --- drivers/staging/media/platform/bcm2835/bcm2835-camera.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/platform/bcm2835/bcm2835-camera.c b/drivers/staging/media/platform/bcm2835/bcm2835-camera.c index 105d88102cd9..ced8eb5de0f0 100644 --- a/drivers/staging/media/platform/bcm2835/bcm2835-camera.c +++ b/drivers/staging/media/platform/bcm2835/bcm2835-camera.c @@ -50,7 +50,7 @@ MODULE_AUTHOR("Vincent Sanders"); MODULE_LICENSE("GPL"); MODULE_VERSION(BM2835_MMAL_VERSION); -int bcm2835_v4l2_debug; +static int bcm2835_v4l2_debug; module_param_named(debug, bcm2835_v4l2_debug, int, 0644); MODULE_PARM_DESC(bcm2835_v4l2_debug, "Debug level 0-2"); @@ -1312,7 +1312,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv, return ret; } -int vidioc_enum_framesizes(struct file *file, void *fh, +static int vidioc_enum_framesizes(struct file *file, void *fh, struct v4l2_frmsizeenum *fsize) { struct bm2835_mmal_dev *dev = video_drvdata(file); @@ -1842,7 +1842,7 @@ static int __init bm2835_mmal_init_device(struct bm2835_mmal_dev *dev, return 0; } -void bcm2835_cleanup_instance(struct bm2835_mmal_dev *dev) +static void bcm2835_cleanup_instance(struct bm2835_mmal_dev *dev) { if (!dev) return;