linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] drivers: make i2c_algorithm const
@ 2017-08-18 16:06 Bhumika Goyal
  2017-08-18 16:06 ` [PATCH 1/2] i2c: busses: " Bhumika Goyal
  2017-08-18 16:06 ` [PATCH 2/2] [media] usb: " Bhumika Goyal
  0 siblings, 2 replies; 5+ messages in thread
From: Bhumika Goyal @ 2017-08-18 16:06 UTC (permalink / raw)
  To: julia.lawall, vz, slemieux.tyco, wsa, gxt, mchehab, isely,
	linux-arm-kernel, linux-i2c, linux-kernel, linux-media
  Cc: Bhumika Goyal

Make these const.

Bhumika Goyal (2):
  i2c: busses: make i2c_algorithm const
  [media] usb: make i2c_algorithm const

 drivers/i2c/busses/i2c-pnx.c                 | 2 +-
 drivers/i2c/busses/i2c-puv3.c                | 2 +-
 drivers/media/usb/au0828/au0828-i2c.c        | 2 +-
 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

-- 
1.9.1

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] i2c: busses: make i2c_algorithm const
  2017-08-18 16:06 [PATCH 0/2] drivers: make i2c_algorithm const Bhumika Goyal
@ 2017-08-18 16:06 ` Bhumika Goyal
  2017-08-29 20:22   ` Wolfram Sang
  2017-08-18 16:06 ` [PATCH 2/2] [media] usb: " Bhumika Goyal
  1 sibling, 1 reply; 5+ messages in thread
From: Bhumika Goyal @ 2017-08-18 16:06 UTC (permalink / raw)
  To: julia.lawall, vz, slemieux.tyco, wsa, gxt, mchehab, isely,
	linux-arm-kernel, linux-i2c, linux-kernel, linux-media
  Cc: Bhumika Goyal

Make these const as they are only stored in the algo field of
i2c_adapter structure, which is const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/i2c/busses/i2c-pnx.c  | 2 +-
 drivers/i2c/busses/i2c-puv3.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index fd5f9d2..42d6b3a 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -590,7 +590,7 @@ static u32 i2c_pnx_func(struct i2c_adapter *adapter)
 	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-static struct i2c_algorithm pnx_algorithm = {
+static const struct i2c_algorithm pnx_algorithm = {
 	.master_xfer = i2c_pnx_xfer,
 	.functionality = i2c_pnx_func,
 };
diff --git a/drivers/i2c/busses/i2c-puv3.c b/drivers/i2c/busses/i2c-puv3.c
index 0c8b157..287088b 100644
--- a/drivers/i2c/busses/i2c-puv3.c
+++ b/drivers/i2c/busses/i2c-puv3.c
@@ -175,7 +175,7 @@ static u32 puv3_i2c_func(struct i2c_adapter *adapter)
 	return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL;
 }
 
-static struct i2c_algorithm puv3_i2c_algorithm = {
+static const struct i2c_algorithm puv3_i2c_algorithm = {
 	.master_xfer	= puv3_i2c_xfer,
 	.functionality	= puv3_i2c_func,
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] [media] usb: make i2c_algorithm const
  2017-08-18 16:06 [PATCH 0/2] drivers: make i2c_algorithm const Bhumika Goyal
  2017-08-18 16:06 ` [PATCH 1/2] i2c: busses: " Bhumika Goyal
@ 2017-08-18 16:06 ` Bhumika Goyal
  2017-08-19 20:15   ` isely
  1 sibling, 1 reply; 5+ messages in thread
From: Bhumika Goyal @ 2017-08-18 16:06 UTC (permalink / raw)
  To: julia.lawall, vz, slemieux.tyco, wsa, gxt, mchehab, isely,
	linux-arm-kernel, linux-i2c, linux-kernel, linux-media
  Cc: Bhumika Goyal

Make these const as they are only used in a copy operation or
are stored in the algo field of i2c_adapter structure, which is const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/media/usb/au0828/au0828-i2c.c        | 2 +-
 drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/usb/au0828/au0828-i2c.c b/drivers/media/usb/au0828/au0828-i2c.c
index 42b352b..a028e36 100644
--- a/drivers/media/usb/au0828/au0828-i2c.c
+++ b/drivers/media/usb/au0828/au0828-i2c.c
@@ -329,7 +329,7 @@ static u32 au0828_functionality(struct i2c_adapter *adap)
 	return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C;
 }
 
-static struct i2c_algorithm au0828_i2c_algo_template = {
+static const struct i2c_algorithm au0828_i2c_algo_template = {
 	.master_xfer	= i2c_xfer,
 	.functionality	= au0828_functionality,
 };
diff --git a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
index 20a52b7..cfa8fbe 100644
--- a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
+++ b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
@@ -514,7 +514,7 @@ static u32 pvr2_i2c_functionality(struct i2c_adapter *adap)
 	return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C;
 }
 
-static struct i2c_algorithm pvr2_i2c_algo_template = {
+static const struct i2c_algorithm pvr2_i2c_algo_template = {
 	.master_xfer   = pvr2_i2c_xfer,
 	.functionality = pvr2_i2c_functionality,
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] [media] usb: make i2c_algorithm const
  2017-08-18 16:06 ` [PATCH 2/2] [media] usb: " Bhumika Goyal
@ 2017-08-19 20:15   ` isely
  0 siblings, 0 replies; 5+ messages in thread
From: isely @ 2017-08-19 20:15 UTC (permalink / raw)
  To: Bhumika Goyal
  Cc: julia.lawall, vz, slemieux.tyco, wsa, gxt, mchehab,
	linux-arm-kernel, linux-i2c, Linux Kernel Mailing List,
	linux-media, Mike Isely at pobox


Acked-by: Mike Isely <isely@pobox.com>

On Fri, 18 Aug 2017, Bhumika Goyal wrote:

> Make these const as they are only used in a copy operation or
> are stored in the algo field of i2c_adapter structure, which is const.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
> ---
>  drivers/media/usb/au0828/au0828-i2c.c        | 2 +-
>  drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/usb/au0828/au0828-i2c.c b/drivers/media/usb/au0828/au0828-i2c.c
> index 42b352b..a028e36 100644
> --- a/drivers/media/usb/au0828/au0828-i2c.c
> +++ b/drivers/media/usb/au0828/au0828-i2c.c
> @@ -329,7 +329,7 @@ static u32 au0828_functionality(struct i2c_adapter *adap)
>  	return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C;
>  }
>  
> -static struct i2c_algorithm au0828_i2c_algo_template = {
> +static const struct i2c_algorithm au0828_i2c_algo_template = {
>  	.master_xfer	= i2c_xfer,
>  	.functionality	= au0828_functionality,
>  };
> diff --git a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
> index 20a52b7..cfa8fbe 100644
> --- a/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
> +++ b/drivers/media/usb/pvrusb2/pvrusb2-i2c-core.c
> @@ -514,7 +514,7 @@ static u32 pvr2_i2c_functionality(struct i2c_adapter *adap)
>  	return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_I2C;
>  }
>  
> -static struct i2c_algorithm pvr2_i2c_algo_template = {
> +static const struct i2c_algorithm pvr2_i2c_algo_template = {
>  	.master_xfer   = pvr2_i2c_xfer,
>  	.functionality = pvr2_i2c_functionality,
>  };
> 

-- 

Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] i2c: busses: make i2c_algorithm const
  2017-08-18 16:06 ` [PATCH 1/2] i2c: busses: " Bhumika Goyal
@ 2017-08-29 20:22   ` Wolfram Sang
  0 siblings, 0 replies; 5+ messages in thread
From: Wolfram Sang @ 2017-08-29 20:22 UTC (permalink / raw)
  To: Bhumika Goyal
  Cc: julia.lawall, vz, slemieux.tyco, gxt, mchehab, isely,
	linux-arm-kernel, linux-i2c, linux-kernel, linux-media

[-- Attachment #1: Type: text/plain, Size: 262 bytes --]

On Fri, Aug 18, 2017 at 09:36:57PM +0530, Bhumika Goyal wrote:
> Make these const as they are only stored in the algo field of
> i2c_adapter structure, which is const.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>

Applied to for-next, thanks!


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-08-29 20:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-18 16:06 [PATCH 0/2] drivers: make i2c_algorithm const Bhumika Goyal
2017-08-18 16:06 ` [PATCH 1/2] i2c: busses: " Bhumika Goyal
2017-08-29 20:22   ` Wolfram Sang
2017-08-18 16:06 ` [PATCH 2/2] [media] usb: " Bhumika Goyal
2017-08-19 20:15   ` isely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).