From patchwork Sat Aug 19 10:34:15 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9910437 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 76393603B5 for ; Sat, 19 Aug 2017 10:35:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 669CB28C31 for ; Sat, 19 Aug 2017 10:35:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5554528D95; Sat, 19 Aug 2017 10:35:54 +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 A7AC428DAA for ; Sat, 19 Aug 2017 10:35:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752274AbdHSKfK (ORCPT ); Sat, 19 Aug 2017 06:35:10 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:36811 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752250AbdHSKfI (ORCPT ); Sat, 19 Aug 2017 06:35:08 -0400 Received: by mail-pf0-f193.google.com with SMTP id t83so2770491pfj.3; Sat, 19 Aug 2017 03:35:07 -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:in-reply-to:references; bh=kCx25tj4lrq9eRUOBazmUe8KSUeCuiF3rIWTenBES5g=; b=oC/4kJp3JMwXluVn/3kqy3oYhf69HF2ndtWHsQCdMcCVbVxUgRlAQQKDHmN5yFL2H7 xbmvp5AU8uE2A2KIiEB1bmWUCYerbksyUYoRpU5MnLOY/pjJ10ah91dmN66bgl2IWXkr WgQfX0eLROGCPzdVCM6RNX1oZ462zff2mRo2KtM5mwZZvblLLKno/0nOT0MmS0tHZqSJ fAShQ+1wE5a2CktBMQLiemPEYkCef3zf9Q8+/yT/dXG5UwcO7RB4rfT+LfQIXN0L20p0 V+w2ZmD+Qz7BX6/wv3bEP7KvFcq/1ubI3yPObJcN7V0KvLGYOZ/GrztuAF6PI1ZG8G9q qAJA== 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:in-reply-to :references; bh=kCx25tj4lrq9eRUOBazmUe8KSUeCuiF3rIWTenBES5g=; b=ASykZ9CQblSeHxOGW7xKSxU5S+ViMCqgYmdfRjwGNyYZ+D0wEJv8AbqVVF0/fQHG4p 68db6jxetznEB8zdaym94R+CEiDlLHbuHy0DfUt9TEYeRhRCzOrP7fnOHtSJ4eyJEmuM 2PyzlyhPMGFpQP1guh1N7LxC/7kl5BeRswU8GEqJXlQjqL+O0Gj5XQjUErSC0vObhR85 IDbEsfU49fEb2gdF91XXabuZu5xNwUVhbs+T3ayCowgnw9XBiZ9o6BtL6/oBWYjapbNY lv7YXv8IWzk1NUyJND9axaaDvYbALptTMo41s1PAJtgVXgOZeLsnjm5NX9p9ToXMNyzJ 0O6g== X-Gm-Message-State: AHYfb5gnuAVsCg35WBzdauWDYzABrGjxcCxybDQFkSf8VAsdj9k6LV67 esRuaSiIyE4MyQ== X-Received: by 10.99.191.6 with SMTP id v6mr11099973pgf.212.1503138907477; Sat, 19 Aug 2017 03:35:07 -0700 (PDT) Received: from gmail.com ([59.94.206.141]) by smtp.gmail.com with ESMTPSA id h29sm15280167pfd.145.2017.08.19.03.35.01 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 19 Aug 2017 03:35:07 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Sat, 19 Aug 2017 16:04:58 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, wsa@the-dreams.de, jacmet@sunsite.dk, jglauber@cavium.com, david.daney@cavium.com, hans.verkuil@cisco.com, mchehab@kernel.org, awalls@md.metrocast.net, serjk@netup.ru, aospan@netup.ru, isely@pobox.com, ezequiel@vanguardiasur.com.ar, linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH 4/4] [media] usb: make i2c_adapter const Date: Sat, 19 Aug 2017 16:04:15 +0530 Message-Id: <1503138855-585-5-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503138855-585-1-git-send-email-bhumirks@gmail.com> References: <1503138855-585-1-git-send-email-bhumirks@gmail.com> 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 these const as they are only used in a copy operation. Done using Coccinelle Signed-off-by: Bhumika Goyal Acked-by: Mike Isely Acked-by: Wolfram Sang --- drivers/media/usb/au0828/au0828-i2c.c | 2 +- drivers/media/usb/cx231xx/cx231xx-i2c.c | 2 +- drivers/media/usb/em28xx/em28xx-i2c.c | 2 +- drivers/media/usb/hdpvr/hdpvr-i2c.c | 2 +- drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 2 +- drivers/media/usb/stk1160/stk1160-i2c.c | 2 +- drivers/media/usb/usbvision/usbvision-i2c.c | 4 ++-- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-i2c.c b/drivers/media/usb/au0828/au0828-i2c.c index 42b352b..9074a98 100644 --- a/drivers/media/usb/au0828/au0828-i2c.c +++ b/drivers/media/usb/au0828/au0828-i2c.c @@ -336,7 +336,7 @@ static u32 au0828_functionality(struct i2c_adapter *adap) /* ----------------------------------------------------------------------- */ -static struct i2c_adapter au0828_i2c_adap_template = { +static const struct i2c_adapter au0828_i2c_adap_template = { .name = KBUILD_MODNAME, .owner = THIS_MODULE, .algo = &au0828_i2c_algo_template, diff --git a/drivers/media/usb/cx231xx/cx231xx-i2c.c b/drivers/media/usb/cx231xx/cx231xx-i2c.c index 8ce6b81..23648da 100644 --- a/drivers/media/usb/cx231xx/cx231xx-i2c.c +++ b/drivers/media/usb/cx231xx/cx231xx-i2c.c @@ -459,7 +459,7 @@ static u32 functionality(struct i2c_adapter *adap) .functionality = functionality, }; -static struct i2c_adapter cx231xx_adap_template = { +static const struct i2c_adapter cx231xx_adap_template = { .owner = THIS_MODULE, .name = "cx231xx", .algo = &cx231xx_algo, diff --git a/drivers/media/usb/em28xx/em28xx-i2c.c b/drivers/media/usb/em28xx/em28xx-i2c.c index 60b195c..66c5012 100644 --- a/drivers/media/usb/em28xx/em28xx-i2c.c +++ b/drivers/media/usb/em28xx/em28xx-i2c.c @@ -876,7 +876,7 @@ static u32 functionality(struct i2c_adapter *i2c_adap) .functionality = functionality, }; -static struct i2c_adapter em28xx_adap_template = { +static const struct i2c_adapter em28xx_adap_template = { .owner = THIS_MODULE, .name = "em28xx", .algo = &em28xx_algo, diff --git a/drivers/media/usb/hdpvr/hdpvr-i2c.c b/drivers/media/usb/hdpvr/hdpvr-i2c.c index fcab550..7329310 100644 --- a/drivers/media/usb/hdpvr/hdpvr-i2c.c +++ b/drivers/media/usb/hdpvr/hdpvr-i2c.c @@ -184,7 +184,7 @@ static u32 hdpvr_functionality(struct i2c_adapter *adapter) .functionality = hdpvr_functionality, }; -static struct i2c_adapter hdpvr_i2c_adapter_template = { +static const struct i2c_adapter hdpvr_i2c_adapter_template = { .name = "Hauppage HD PVR I2C", .owner = THIS_MODULE, .algo = &hdpvr_algo, diff --git a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c index 20a52b7..3618ace 100644 --- a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c +++ b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c @@ -519,7 +519,7 @@ static u32 pvr2_i2c_functionality(struct i2c_adapter *adap) .functionality = pvr2_i2c_functionality, }; -static struct i2c_adapter pvr2_i2c_adap_template = { +static const struct i2c_adapter pvr2_i2c_adap_template = { .owner = THIS_MODULE, .class = 0, }; diff --git a/drivers/media/usb/stk1160/stk1160-i2c.c b/drivers/media/usb/stk1160/stk1160-i2c.c index 3f2517b..2c70173 100644 --- a/drivers/media/usb/stk1160/stk1160-i2c.c +++ b/drivers/media/usb/stk1160/stk1160-i2c.c @@ -240,7 +240,7 @@ static u32 functionality(struct i2c_adapter *adap) .functionality = functionality, }; -static struct i2c_adapter adap_template = { +static const struct i2c_adapter adap_template = { .owner = THIS_MODULE, .name = "stk1160", .algo = &algo, diff --git a/drivers/media/usb/usbvision/usbvision-i2c.c b/drivers/media/usb/usbvision/usbvision-i2c.c index 68acafb..837bd4d 100644 --- a/drivers/media/usb/usbvision/usbvision-i2c.c +++ b/drivers/media/usb/usbvision/usbvision-i2c.c @@ -173,7 +173,7 @@ static u32 functionality(struct i2c_adapter *adap) /* ----------------------------------------------------------------------- */ /* usbvision specific I2C functions */ /* ----------------------------------------------------------------------- */ -static struct i2c_adapter i2c_adap_template; +static const struct i2c_adapter i2c_adap_template; int usbvision_i2c_register(struct usb_usbvision *usbvision) { @@ -441,7 +441,7 @@ static int usbvision_i2c_read(struct usb_usbvision *usbvision, unsigned char add return rdcount; } -static struct i2c_adapter i2c_adap_template = { +static const struct i2c_adapter i2c_adap_template = { .owner = THIS_MODULE, .name = "usbvision", };