From patchwork Thu Jun 29 08:51:24 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9816251 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 8D90D6020A for ; Thu, 29 Jun 2017 08:54:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3C2E2285EC for ; Thu, 29 Jun 2017 08:53:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2D0EB2867D; Thu, 29 Jun 2017 08:53:59 +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=-5.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, RCVD_IN_SORBS_WEB autolearn=ham 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 BB23F285EC for ; Thu, 29 Jun 2017 08:53:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751894AbdF2Ix5 (ORCPT ); Thu, 29 Jun 2017 04:53:57 -0400 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36279 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751855AbdF2Ixz (ORCPT ); Thu, 29 Jun 2017 04:53:55 -0400 Received: by mail-pg0-f67.google.com with SMTP id u36so11151989pgn.3; Thu, 29 Jun 2017 01:53:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=82I3jwWmbA3a9pasqHxK1087adl07t9MsQuVCMab6IM=; b=eXAqdaQ1/RJasUXqpf/D06fX15BRWGTieQFIkPR7mjF8g8aO6gVqpNDNNxVzTEO10W uYmM7/odZ/khlX9yTbp9ye/yn3cTRy/G2sEkemHTi1d34127nRJdgW0FtJZw8DhE2pC9 Qrf/uD4k/iacMdeXNqE056iB8ab/w3V4/mRyjh4+n+LhDKzfmacEGBA/1gXCav6AdQuM nw4Rr6hYQt3WW+9C3FDPL2i2yOQpwOCKfNx0su/V+q7AvdlA6QR3JNRyHBobZbXw8Qt+ wNE7qz/IhdzwSawrG6ilCOHogRF1RfTAMuNhtfWaY0ka/ZoCKhZVlC3mm0VvxSvQz3+D 9jkw== 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=82I3jwWmbA3a9pasqHxK1087adl07t9MsQuVCMab6IM=; b=n+3iJ2gEQ/N9fusMuOKfsYLwrf+yMczpwc+iJZYY50biqH2cdcqUHiFXlf66CPevD+ XnC/OFPG7VCTDRx2FAnYf+IjbbJPzmIUvpmlI7eZjB2g/OvocC9bLwAmjrIQaOcC2Ilq uomcP2LL6UJytac8CXQ3pKIHsOAxyQvmot85skqjE2scdx312kR9OxgErQHHZ084WSav LKdHDmESSxaBooRhkHB+9ZtEm4mBhxsteJsXW059bT+lmmflsa7n7YovnIpBu0oCWLdn VwnWkhF4K68Q/Yv55my9MAj8WbLFOue2k98aXz3NvJyfjMpfbUaRSXzHg7StLZm+3xMp tWow== X-Gm-Message-State: AKS2vOwxyi17v4H6dJMWOcac8tJMiqnAqjgl2HTduHcs1qluWEwFM67M 4i+oPGL3NO+W/A== X-Received: by 10.98.133.16 with SMTP id u16mr4281575pfd.140.1498726434656; Thu, 29 Jun 2017 01:53:54 -0700 (PDT) Received: from gmail.com ([106.51.8.234]) by smtp.gmail.com with ESMTPSA id d2sm10753204pfb.49.2017.06.29.01.53.49 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 29 Jun 2017 01:53:53 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Thu, 29 Jun 2017 14:21:42 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, scott.jiang.linux@gmail.com, mchehab@kernel.org, prabhakar.csengg@gmail.com, g.liakhovetski@gmx.de, adi-buildroot-devel@lists.sourceforge.net, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] [media] media/platform: add const to v4l2_file_operations structures Date: Thu, 29 Jun 2017 14:21:24 +0530 Message-Id: <1498726284-10182-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 2.7.4 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 Declare v4l2_file_operations structures as const as they are only stored in the fops field of video_device structures. This field is of type const, so declare v4l2_file_operations structures with similar properties as const. Cross compiled bfin_capture.o for blackfin arch. vpbe_display.o file did not cross compile for arm. Could not find any architecture matching the configuraion symbol for fsl-viu.c file. Signed-off-by: Bhumika Goyal Acked-by: Lad, Prabhakar --- drivers/media/platform/blackfin/bfin_capture.c | 2 +- drivers/media/platform/davinci/vpbe_display.c | 2 +- drivers/media/platform/davinci/vpif_capture.c | 2 +- drivers/media/platform/fsl-viu.c | 2 +- drivers/media/platform/soc_camera/soc_camera.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c index 1c5166d..294d696 100644 --- a/drivers/media/platform/blackfin/bfin_capture.c +++ b/drivers/media/platform/blackfin/bfin_capture.c @@ -769,7 +769,7 @@ static const struct v4l2_ioctl_ops bcap_ioctl_ops = { .vidioc_log_status = bcap_log_status, }; -static struct v4l2_file_operations bcap_fops = { +static const struct v4l2_file_operations bcap_fops = { .owner = THIS_MODULE, .open = v4l2_fh_open, .release = vb2_fop_release, diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index a9bc017..ca2adfa 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -1275,7 +1275,7 @@ static const struct v4l2_ioctl_ops vpbe_ioctl_ops = { .vidioc_enum_dv_timings = vpbe_display_enum_dv_timings, }; -static struct v4l2_file_operations vpbe_fops = { +static const struct v4l2_file_operations vpbe_fops = { .owner = THIS_MODULE, .open = vpbe_display_open, .release = vpbe_display_release, diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index d78580f..fbdc196 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c @@ -1344,7 +1344,7 @@ static const struct v4l2_ioctl_ops vpif_ioctl_ops = { }; /* vpif file operations */ -static struct v4l2_file_operations vpif_fops = { +static const struct v4l2_file_operations vpif_fops = { .owner = THIS_MODULE, .open = v4l2_fh_open, .release = vb2_fop_release, diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index 97e164b..f7b88e5 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c @@ -1340,7 +1340,7 @@ static int viu_mmap(struct file *file, struct vm_area_struct *vma) return ret; } -static struct v4l2_file_operations viu_fops = { +static const struct v4l2_file_operations viu_fops = { .owner = THIS_MODULE, .open = viu_open, .release = viu_release, diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index 45a0429..dd349ef 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c @@ -820,7 +820,7 @@ static unsigned int soc_camera_poll(struct file *file, poll_table *pt) return res; } -static struct v4l2_file_operations soc_camera_fops = { +static const struct v4l2_file_operations soc_camera_fops = { .owner = THIS_MODULE, .open = soc_camera_open, .release = soc_camera_close,