i2c: busses: make i2c_adapter const
authorBhumika Goyal <bhumirks@gmail.com>
Sat, 19 Aug 2017 10:34:12 +0000 (16:04 +0530)
committerWolfram Sang <wsa@the-dreams.de>
Tue, 29 Aug 2017 20:26:08 +0000 (22:26 +0200)
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>
drivers/i2c/busses/i2c-kempld.c
drivers/i2c/busses/i2c-ocores.c
drivers/i2c/busses/i2c-octeon-platdrv.c
drivers/i2c/busses/i2c-thunderx-pcidrv.c
drivers/i2c/busses/i2c-xiic.c

index 25993d2e64bf89dc8552446bc4ccf841a7a857d9..e879190b5d1d899457ec6dd11b9cc7bd73e61f5b 100644 (file)
@@ -289,7 +289,7 @@ static const struct i2c_algorithm kempld_i2c_algorithm = {
        .functionality  = kempld_i2c_func,
 };
 
-static struct i2c_adapter kempld_i2c_adapter = {
+static const struct i2c_adapter kempld_i2c_adapter = {
        .owner          = THIS_MODULE,
        .name           = "i2c-kempld",
        .class          = I2C_CLASS_HWMON | I2C_CLASS_SPD,
index 34f1889a407368e7bb14ecbfba3e86d28730c21d..8c42ca7107b2c9a2c494b6f8b9ace52e9cb5b3b8 100644 (file)
@@ -276,7 +276,7 @@ static const struct i2c_algorithm ocores_algorithm = {
        .functionality = ocores_func,
 };
 
-static struct i2c_adapter ocores_adapter = {
+static const struct i2c_adapter ocores_adapter = {
        .owner = THIS_MODULE,
        .name = "i2c-ocores",
        .class = I2C_CLASS_DEPRECATED,
index 917524ce68901aec664decf53a0d2252f9cd7f59..64bda83e65ac122c18540f1fb441fc11f38bb76c 100644 (file)
@@ -126,7 +126,7 @@ static const struct i2c_algorithm octeon_i2c_algo = {
        .functionality = octeon_i2c_functionality,
 };
 
-static struct i2c_adapter octeon_i2c_ops = {
+static const struct i2c_adapter octeon_i2c_ops = {
        .owner = THIS_MODULE,
        .name = "OCTEON adapter",
        .algo = &octeon_i2c_algo,
index ea35a895b5682a033d377d9896b6525fddfd85fd..df0976f4432a152d6ff613dc57239de81919afde 100644 (file)
@@ -75,7 +75,7 @@ static const struct i2c_algorithm thunderx_i2c_algo = {
        .functionality = thunderx_i2c_functionality,
 };
 
-static struct i2c_adapter thunderx_i2c_ops = {
+static const struct i2c_adapter thunderx_i2c_ops = {
        .owner  = THIS_MODULE,
        .name   = "ThunderX adapter",
        .algo   = &thunderx_i2c_algo,
index 34b27bfe72babd1c2ad58036845cc8c6fea143a4..ae6ed254e01db5c10eb79e7bed4718da4d94536a 100644 (file)
@@ -721,7 +721,7 @@ static const struct i2c_algorithm xiic_algorithm = {
        .functionality = xiic_func,
 };
 
-static struct i2c_adapter xiic_adapter = {
+static const struct i2c_adapter xiic_adapter = {
        .owner = THIS_MODULE,
        .name = DRIVER_NAME,
        .class = I2C_CLASS_DEPRECATED,