From patchwork Wed Sep 27 17:08:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9974457 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 312CB603F2 for ; Wed, 27 Sep 2017 17:09:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1DC9C292BA for ; Wed, 27 Sep 2017 17:09:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1299D292B9; Wed, 27 Sep 2017 17:09:14 +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.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 B2A57292B6 for ; Wed, 27 Sep 2017 17:09:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751590AbdI0RIm (ORCPT ); Wed, 27 Sep 2017 13:08:42 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:38747 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750786AbdI0RIl (ORCPT ); Wed, 27 Sep 2017 13:08:41 -0400 Received: by mail-pg0-f68.google.com with SMTP id m30so9804619pgn.5; Wed, 27 Sep 2017 10:08:41 -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=tzJvxIW3nFHsGKkmSIBgDCjpL+Ji6rkhXcaZyTd9mxo=; b=LpTimLliR8k4GySSzVCPVFBwWJk/r7NR067R9W6n+gFKV/jidboLePkm27IeUJNRNK Z7qL30TBP6e5ycXQuzgyAcBk/B6ahncaRCAbljvD/2MBXITc/7ftVwBE6EH09ElEc1Pw PcQpVIKYcc9mgUaNCdre3yGGjeGOmlpoyUyPc3amF5c0SH2alSwAqbM44GqfYEM3oGD4 AlYWP0KX0fWd23CK+B5S6pzw6/Je0uZXSNd0ZhO6iDXpnCiAeOCOjZfgwxeZ9ksOnl3Q 1EM1gczmtLLd8BrTfwJwR1irznrrLi6njxhB8HiK/3BKGnizwgOl8ePfaNMIAm1snmMu E9UQ== 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=tzJvxIW3nFHsGKkmSIBgDCjpL+Ji6rkhXcaZyTd9mxo=; b=qL7LKCNTPOsLRnSYWMYu+HJ1gL3VFsgXYBnop6wiIavOpVUZDwd4qVkd/+UcYOKbt7 Wn4RCJQ2Q2fAUSGgAMliDn4zhfI9hW+GTsyL3yCm7uZVr5pWB+slXdcSIYMsZxn9frGd k+4YmfYStrLJAE9GeRwqQq/fmm/u7bQ+faaUDhfZJ86XPBvbQJU5C0JDToplxUVx/n6O 0LjSneAbvwRby6yR5w/0xMGMqT2SoGVNAXjyIkNtrdlv/4n5Kcl8Pt7zXPbRtXlE+ER5 CBk1SqgyJ3AQJpym0NtvJO4urbmkSQKVOPbcZMh0SpF69MlMdeGfzuiigrxD7tdBiSVJ MTLA== X-Gm-Message-State: AHPjjUg+hbtC3x5IcuCbG/glp97mH69duQc0xRXncIJNl0V7uKMo0fnK M73qUXbWzcE2T1k9L6E8fsE= X-Google-Smtp-Source: AOwi7QAn/UchKs+0+JTfvnSN+FdEYVTvvNOLbmMZodwJnSOO5pbUcTfPC8uDBB0/mGsuX0dY8aqqdw== X-Received: by 10.84.210.105 with SMTP id z96mr1775059plh.183.1506532120750; Wed, 27 Sep 2017 10:08:40 -0700 (PDT) Received: from gmail.com ([117.196.114.104]) by smtp.gmail.com with ESMTPSA id q136sm3838049pfq.10.2017.09.27.10.08.34 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 27 Sep 2017 10:08:40 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Wed, 27 Sep 2017 22:38:22 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] [media] vb2: make vb2_ops Date: Wed, 27 Sep 2017 22:38:19 +0530 Message-Id: <1506532099-8114-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 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 Make vb2_ops const as they are only stored in the const field of a vb2_queue structure. Make the declarations const too. Done using Coccinelle. Signed-off-by: Bhumika Goyal --- drivers/media/usb/au0828/au0828-vbi.c | 2 +- drivers/media/usb/au0828/au0828.h | 2 +- drivers/media/usb/em28xx/em28xx-v4l.h | 2 +- drivers/media/usb/em28xx/em28xx-vbi.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-vbi.c b/drivers/media/usb/au0828/au0828-vbi.c index e0930ce..9dd6bdb 100644 --- a/drivers/media/usb/au0828/au0828-vbi.c +++ b/drivers/media/usb/au0828/au0828-vbi.c @@ -79,7 +79,7 @@ static int vbi_buffer_prepare(struct vb2_buffer *vb) spin_unlock_irqrestore(&dev->slock, flags); } -struct vb2_ops au0828_vbi_qops = { +const struct vb2_ops au0828_vbi_qops = { .queue_setup = vbi_queue_setup, .buf_prepare = vbi_buffer_prepare, .buf_queue = vbi_buffer_queue, diff --git a/drivers/media/usb/au0828/au0828.h b/drivers/media/usb/au0828/au0828.h index 05e445f..f6f37e8 100644 --- a/drivers/media/usb/au0828/au0828.h +++ b/drivers/media/usb/au0828/au0828.h @@ -358,7 +358,7 @@ static inline int au0828_analog_unregister(struct au0828_dev *dev) void au0828_dvb_resume(struct au0828_dev *dev); /* au0828-vbi.c */ -extern struct vb2_ops au0828_vbi_qops; +extern const struct vb2_ops au0828_vbi_qops; #define dprintk(level, fmt, arg...)\ do { if (au0828_debug & level)\ diff --git a/drivers/media/usb/em28xx/em28xx-v4l.h b/drivers/media/usb/em28xx/em28xx-v4l.h index 8dfcb56..9c411aa 100644 --- a/drivers/media/usb/em28xx/em28xx-v4l.h +++ b/drivers/media/usb/em28xx/em28xx-v4l.h @@ -16,4 +16,4 @@ int em28xx_start_analog_streaming(struct vb2_queue *vq, unsigned int count); void em28xx_stop_vbi_streaming(struct vb2_queue *vq); -extern struct vb2_ops em28xx_vbi_qops; +extern const struct vb2_ops em28xx_vbi_qops; diff --git a/drivers/media/usb/em28xx/em28xx-vbi.c b/drivers/media/usb/em28xx/em28xx-vbi.c index 0bac552..f512365 100644 --- a/drivers/media/usb/em28xx/em28xx-vbi.c +++ b/drivers/media/usb/em28xx/em28xx-vbi.c @@ -93,7 +93,7 @@ static int vbi_buffer_prepare(struct vb2_buffer *vb) spin_unlock_irqrestore(&dev->slock, flags); } -struct vb2_ops em28xx_vbi_qops = { +const struct vb2_ops em28xx_vbi_qops = { .queue_setup = vbi_queue_setup, .buf_prepare = vbi_buffer_prepare, .buf_queue = vbi_buffer_queue,