Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

i2c: busses: make i2c_adapter const

Make these const as they are only used in a copy operation.
Done using Coccinelle.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Acked-by: David Daney <david.daney@cavium.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>

authored by

Bhumika Goyal and committed by
Wolfram Sang
329430cc ad3caf8a

+5 -5
+1 -1
drivers/i2c/busses/i2c-kempld.c
··· 289 289 .functionality = kempld_i2c_func, 290 290 }; 291 291 292 - static struct i2c_adapter kempld_i2c_adapter = { 292 + static const struct i2c_adapter kempld_i2c_adapter = { 293 293 .owner = THIS_MODULE, 294 294 .name = "i2c-kempld", 295 295 .class = I2C_CLASS_HWMON | I2C_CLASS_SPD,
+1 -1
drivers/i2c/busses/i2c-ocores.c
··· 276 276 .functionality = ocores_func, 277 277 }; 278 278 279 - static struct i2c_adapter ocores_adapter = { 279 + static const struct i2c_adapter ocores_adapter = { 280 280 .owner = THIS_MODULE, 281 281 .name = "i2c-ocores", 282 282 .class = I2C_CLASS_DEPRECATED,
+1 -1
drivers/i2c/busses/i2c-octeon-platdrv.c
··· 126 126 .functionality = octeon_i2c_functionality, 127 127 }; 128 128 129 - static struct i2c_adapter octeon_i2c_ops = { 129 + static const struct i2c_adapter octeon_i2c_ops = { 130 130 .owner = THIS_MODULE, 131 131 .name = "OCTEON adapter", 132 132 .algo = &octeon_i2c_algo,
+1 -1
drivers/i2c/busses/i2c-thunderx-pcidrv.c
··· 75 75 .functionality = thunderx_i2c_functionality, 76 76 }; 77 77 78 - static struct i2c_adapter thunderx_i2c_ops = { 78 + static const struct i2c_adapter thunderx_i2c_ops = { 79 79 .owner = THIS_MODULE, 80 80 .name = "ThunderX adapter", 81 81 .algo = &thunderx_i2c_algo,
+1 -1
drivers/i2c/busses/i2c-xiic.c
··· 721 721 .functionality = xiic_func, 722 722 }; 723 723 724 - static struct i2c_adapter xiic_adapter = { 724 + static const struct i2c_adapter xiic_adapter = { 725 725 .owner = THIS_MODULE, 726 726 .name = DRIVER_NAME, 727 727 .class = I2C_CLASS_DEPRECATED,