From patchwork Fri Nov 29 10:29:42 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jani Nikula X-Patchwork-Id: 11266979 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9290B930 for ; Fri, 29 Nov 2019 10:31:20 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7AFF7215F1 for ; Fri, 29 Nov 2019 10:31:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7AFF7215F1 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D8A116E8C7; Fri, 29 Nov 2019 10:31:19 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8B98F6E8C4; Fri, 29 Nov 2019 10:31:16 +0000 (UTC) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2019 02:31:16 -0800 X-IronPort-AV: E=Sophos;i="5.69,257,1571727600"; d="scan'208";a="234672184" Received: from jnikula-mobl3.fi.intel.com (HELO localhost) ([10.237.66.161]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 29 Nov 2019 02:31:12 -0800 From: Jani Nikula To: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org Date: Fri, 29 Nov 2019 12:29:42 +0200 Message-Id: <9cfc1a171d12a52dfbd5508d737681f2d89d21df.1575022735.git.jani.nikula@intel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Subject: [Intel-gfx] [PATCH v2 12/14] media: constify fb ops across all drivers X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andy Walls , jani.nikula@intel.com, Daniel Vetter , intel-gfx@lists.freedesktop.org, ivtv-devel@ivtvdriver.org, Hans Verkuil , linux-media@vger.kernel.org Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" Now that the fbops member of struct fb_info is const, we can start making the ops const as well. Remove the redundant fbops assignments while at it. v2: - actually add const in vivid - fix typo (Christophe de Dinechin) Cc: Hans Verkuil Cc: Andy Walls Cc: linux-media@vger.kernel.org Cc: ivtv-devel@ivtvdriver.org Reviewed-by: Daniel Vetter Signed-off-by: Jani Nikula fixup-to-media --- drivers/media/pci/ivtv/ivtvfb.c | 3 +-- drivers/media/platform/vivid/vivid-osd.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/pci/ivtv/ivtvfb.c b/drivers/media/pci/ivtv/ivtvfb.c index 95a56cce9b65..f2922b554b09 100644 --- a/drivers/media/pci/ivtv/ivtvfb.c +++ b/drivers/media/pci/ivtv/ivtvfb.c @@ -925,7 +925,7 @@ static int ivtvfb_blank(int blank_mode, struct fb_info *info) return 0; } -static struct fb_ops ivtvfb_ops = { +static const struct fb_ops ivtvfb_ops = { .owner = THIS_MODULE, .fb_write = ivtvfb_write, .fb_check_var = ivtvfb_check_var, @@ -1049,7 +1049,6 @@ static int ivtvfb_init_vidmode(struct ivtv *itv) oi->ivtvfb_info.node = -1; oi->ivtvfb_info.flags = FBINFO_FLAG_DEFAULT; - oi->ivtvfb_info.fbops = &ivtvfb_ops; oi->ivtvfb_info.par = itv; oi->ivtvfb_info.var = oi->ivtvfb_defined; oi->ivtvfb_info.fix = oi->ivtvfb_fix; diff --git a/drivers/media/platform/vivid/vivid-osd.c b/drivers/media/platform/vivid/vivid-osd.c index f2e789bdf4a6..fbaec8acc161 100644 --- a/drivers/media/platform/vivid/vivid-osd.c +++ b/drivers/media/platform/vivid/vivid-osd.c @@ -244,7 +244,7 @@ static int vivid_fb_blank(int blank_mode, struct fb_info *info) return 0; } -static struct fb_ops vivid_fb_ops = { +static const struct fb_ops vivid_fb_ops = { .owner = THIS_MODULE, .fb_check_var = vivid_fb_check_var, .fb_set_par = vivid_fb_set_par, @@ -311,7 +311,6 @@ static int vivid_fb_init_vidmode(struct vivid_dev *dev) dev->fb_info.node = -1; dev->fb_info.flags = FBINFO_FLAG_DEFAULT; - dev->fb_info.fbops = &vivid_fb_ops; dev->fb_info.par = dev; dev->fb_info.var = dev->fb_defined; dev->fb_info.fix = dev->fb_fix;