i2c: constify i2c_adapter_quirks structures
authorJulia Lawall <julia.lawall@lip6.fr>
Sat, 15 Oct 2016 17:32:01 +0000 (19:32 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Fri, 18 Nov 2016 01:05:03 +0000 (02:05 +0100)
Check for i2c_adapter_quirks structures that are only stored in the
quirks field of an i2c_adapter structure.  This field is declared
const, so i2c_adapter_quirks structures that have this property can be
declared as const also.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ray Jui <ray.jui@broadcom.com> # for bcm-iproc
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-axxia.c
drivers/i2c/busses/i2c-bcm-iproc.c
drivers/i2c/busses/i2c-dln2.c
drivers/i2c/busses/i2c-viperboard.c

index 4351a9343058920e76bf9aa39eabceedf7a0a570..13f07482ec68cedb1e24eb1d92ac6939a394a97f 100644 (file)
@@ -489,7 +489,7 @@ static const struct i2c_algorithm axxia_i2c_algo = {
        .functionality = axxia_i2c_func,
 };
 
-static struct i2c_adapter_quirks axxia_i2c_quirks = {
+static const struct i2c_adapter_quirks axxia_i2c_quirks = {
        .max_read_len = 255,
        .max_write_len = 255,
 };
index 326b3db02c48b2cfce1591243e5db8e9b57855ba..318df559adc5cd262d97e6f8de70fb678ded2b9c 100644 (file)
@@ -395,7 +395,7 @@ static const struct i2c_algorithm bcm_iproc_algo = {
        .functionality = bcm_iproc_i2c_functionality,
 };
 
-static struct i2c_adapter_quirks bcm_iproc_i2c_quirks = {
+static const struct i2c_adapter_quirks bcm_iproc_i2c_quirks = {
        /* need to reserve one byte in the FIFO for the slave address */
        .max_read_len = M_TX_RX_FIFO_SIZE - 1,
 };
index 8acda2aa15583c327221d4f9a30f74566123aaee..69075a32073e4a8281fe91301d2e68eba3674d2d 100644 (file)
@@ -182,7 +182,7 @@ static const struct i2c_algorithm dln2_i2c_usb_algorithm = {
        .functionality = dln2_i2c_func,
 };
 
-static struct i2c_adapter_quirks dln2_i2c_quirks = {
+static const struct i2c_adapter_quirks dln2_i2c_quirks = {
        .max_read_len = DLN2_I2C_MAX_XFER_SIZE,
        .max_write_len = DLN2_I2C_MAX_XFER_SIZE,
 };
index 543456a0a3382df396df4329fb301e657a1bcc7c..e4be86b3de9a28b201bcd197470ab3a3a78ee683 100644 (file)
@@ -354,7 +354,7 @@ static const struct i2c_algorithm vprbrd_algorithm = {
        .functionality  = vprbrd_i2c_func,
 };
 
-static struct i2c_adapter_quirks vprbrd_quirks = {
+static const struct i2c_adapter_quirks vprbrd_quirks = {
        .max_read_len = 2048,
        .max_write_len = 2048,
 };