linux-i2c.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] i2c: versatile: Make i2c_algo_bit_data const
@ 2017-08-21 13:28 Bhumika Goyal
  2017-08-29 20:34 ` Wolfram Sang
  0 siblings, 1 reply; 2+ messages in thread
From: Bhumika Goyal @ 2017-08-21 13:28 UTC (permalink / raw)
  To: julia.lawall, wsa, linux-i2c, linux-kernel; +Cc: Bhumika Goyal

Make this const as it is only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/i2c/busses/i2c-versatile.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-versatile.c b/drivers/i2c/busses/i2c-versatile.c
index c73d2d2..f1ab2a6 100644
--- a/drivers/i2c/busses/i2c-versatile.c
+++ b/drivers/i2c/busses/i2c-versatile.c
@@ -55,7 +55,7 @@ static int i2c_versatile_getscl(void *data)
 	return !!(readl(i2c->base + I2C_CONTROL) & SCL);
 }
 
-static struct i2c_algo_bit_data i2c_versatile_algo = {
+static const struct i2c_algo_bit_data i2c_versatile_algo = {
 	.setsda	= i2c_versatile_setsda,
 	.setscl = i2c_versatile_setscl,
 	.getsda	= i2c_versatile_getsda,
-- 
1.9.1

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

* Re: [PATCH] i2c: versatile: Make i2c_algo_bit_data const
  2017-08-21 13:28 [PATCH] i2c: versatile: Make i2c_algo_bit_data const Bhumika Goyal
@ 2017-08-29 20:34 ` Wolfram Sang
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfram Sang @ 2017-08-29 20:34 UTC (permalink / raw)
  To: Bhumika Goyal; +Cc: julia.lawall, linux-i2c, linux-kernel

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

On Mon, Aug 21, 2017 at 06:58:37PM +0530, Bhumika Goyal wrote:
> Make this const as it is only used in a copy operation.
> Done using Coccinelle.
> 
> 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] 2+ messages in thread

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-21 13:28 [PATCH] i2c: versatile: Make i2c_algo_bit_data const Bhumika Goyal
2017-08-29 20:34 ` Wolfram Sang

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).