can: mark bittiming_const pointer in struct can_priv as const
authorMarc Kleine-Budde <mkl@pengutronix.de>
Mon, 16 Jul 2012 10:58:31 +0000 (12:58 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Fri, 20 Jul 2012 10:31:05 +0000 (12:31 +0200)
This patch marks the bittiming_const pointer as in the struct can_pric as
"const". This allows us to mark the struct can_bittiming_const in the CAN
drivers as "const", too.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
15 files changed:
drivers/net/can/at91_can.c
drivers/net/can/bfin_can.c
drivers/net/can/c_can/c_can.c
drivers/net/can/cc770/cc770.c
drivers/net/can/flexcan.c
drivers/net/can/janz-ican3.c
drivers/net/can/mcp251x.c
drivers/net/can/mscan/mscan.c
drivers/net/can/pch_can.c
drivers/net/can/sja1000/sja1000.c
drivers/net/can/ti_hecc.c
drivers/net/can/usb/ems_usb.c
drivers/net/can/usb/esd_usb2.c
drivers/net/can/usb/peak_usb/pcan_usb_core.h
include/linux/can/dev.h

index 6ea905c2cf6d1f030dd0893f0a1097e1d5aef03f..fcff73a73b1d9b068565207f7d46479504fc9723 100644 (file)
@@ -170,7 +170,7 @@ static const struct at91_devtype_data at91_devtype_data[] __devinitconst = {
        },
 };
 
-static struct can_bittiming_const at91_bittiming_const = {
+static const struct can_bittiming_const at91_bittiming_const = {
        .name           = KBUILD_MODNAME,
        .tseg1_min      = 4,
        .tseg1_max      = 16,
index ea3143895e6dfafaf2a8823c0fa54801902055ce..f2d6d258a28629e3462921d37555cc85fbdb1ccb 100644 (file)
@@ -44,7 +44,7 @@ struct bfin_can_priv {
 /*
  * bfin can timing parameters
  */
-static struct can_bittiming_const bfin_can_bittiming_const = {
+static const struct can_bittiming_const bfin_can_bittiming_const = {
        .name = DRV_NAME,
        .tseg1_min = 1,
        .tseg1_max = 16,
index eea660800a09cb35587adb143a1b5c98c4adf168..4c538e3886553f678729ebe2aa42affd021cc755 100644 (file)
@@ -189,7 +189,7 @@ enum c_can_bus_error_types {
        C_CAN_ERROR_PASSIVE,
 };
 
-static struct can_bittiming_const c_can_bittiming_const = {
+static const struct can_bittiming_const c_can_bittiming_const = {
        .name = KBUILD_MODNAME,
        .tseg1_min = 2,         /* Time segment 1 = prop_seg + phase_seg1 */
        .tseg1_max = 16,
index a138db11cbf096d9fb14aeac714b2798ac1f7ba8..0f12abf6591ce79bdc30b1f69844f7d811ac5d1e 100644 (file)
@@ -90,7 +90,7 @@ static unsigned char cc770_obj_flags[CC770_OBJ_MAX] = {
        [CC770_OBJ_TX] = 0,
 };
 
-static struct can_bittiming_const cc770_bittiming_const = {
+static const struct can_bittiming_const cc770_bittiming_const = {
        .name = KBUILD_MODNAME,
        .tseg1_min = 1,
        .tseg1_max = 16,
index 1b6f5621ce893f646dde61a04b691634634bdf47..c8a6fc72606de08659efb978ce09ec13f8e9c931 100644 (file)
@@ -203,7 +203,7 @@ static struct flexcan_devtype_data fsl_imx6q_devtype_data = {
        .hw_ver = 10,
 };
 
-static struct can_bittiming_const flexcan_bittiming_const = {
+static const struct can_bittiming_const flexcan_bittiming_const = {
        .name = DRV_NAME,
        .tseg1_min = 4,
        .tseg1_max = 16,
index 08c893cb7896a9e97e5bc920f0f65613b33e24f6..e7d1532d5f1bb98c5e3fe8957f5ea6e511c5cfbe 100644 (file)
@@ -1490,7 +1490,7 @@ static const struct net_device_ops ican3_netdev_ops = {
  */
 
 /* This structure was stolen from drivers/net/can/sja1000/sja1000.c */
-static struct can_bittiming_const ican3_bittiming_const = {
+static const struct can_bittiming_const ican3_bittiming_const = {
        .name = DRV_NAME,
        .tseg1_min = 1,
        .tseg1_max = 16,
index 9120a36ec7025294c84732eaef7e3635f43f0c6b..a580db29e50360f8be44403e5893764261562549 100644 (file)
@@ -214,7 +214,7 @@ static int mcp251x_enable_dma; /* Enable SPI DMA. Default: 0 (Off) */
 module_param(mcp251x_enable_dma, int, S_IRUGO);
 MODULE_PARM_DESC(mcp251x_enable_dma, "Enable SPI DMA. Default: 0 (Off)");
 
-static struct can_bittiming_const mcp251x_bittiming_const = {
+static const struct can_bittiming_const mcp251x_bittiming_const = {
        .name = DEVICE_NAME,
        .tseg1_min = 3,
        .tseg1_max = 16,
index 41a2a2dda7ea73e09550ee9eee43b162ba73a402..2b104d5f422c07b497e3fd8966bc9675b7bfe4ce 100644 (file)
@@ -34,7 +34,7 @@
 
 #include "mscan.h"
 
-static struct can_bittiming_const mscan_bittiming_const = {
+static const struct can_bittiming_const mscan_bittiming_const = {
        .name = "mscan",
        .tseg1_min = 4,
        .tseg1_max = 16,
index 1226297e7676aab20bc65f6e716f0b12299e7812..48b3d62b34cba9021373091aea34049bdc608bde 100644 (file)
@@ -184,7 +184,7 @@ struct pch_can_priv {
        int use_msi;
 };
 
-static struct can_bittiming_const pch_can_bittiming_const = {
+static const struct can_bittiming_const pch_can_bittiming_const = {
        .name = KBUILD_MODNAME,
        .tseg1_min = 2,
        .tseg1_max = 16,
index 5e10472371eda2db2764e5976b55e58d9f70f044..4c4f33d482d2faa44d36bb1cfe669470032eb8b3 100644 (file)
@@ -69,7 +69,7 @@ MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>");
 MODULE_LICENSE("Dual BSD/GPL");
 MODULE_DESCRIPTION(DRV_NAME "CAN netdevice driver");
 
-static struct can_bittiming_const sja1000_bittiming_const = {
+static const struct can_bittiming_const sja1000_bittiming_const = {
        .name = DRV_NAME,
        .tseg1_min = 1,
        .tseg1_max = 16,
index 4accd7ec69543facab276fe3d6d2fd8b902c3604..527dbcf9533561489bb33332f03462ac5f405f43 100644 (file)
@@ -196,7 +196,7 @@ MODULE_VERSION(HECC_MODULE_VERSION);
 #define HECC_CANGIM_SIL                BIT(2)  /* system interrupts to int line 1 */
 
 /* CAN Bittiming constants as per HECC specs */
-static struct can_bittiming_const ti_hecc_bittiming_const = {
+static const struct can_bittiming_const ti_hecc_bittiming_const = {
        .name = DRV_NAME,
        .tseg1_min = 1,
        .tseg1_max = 16,
index 7ae65fc80032c851ca1ad48151140927deabc7ea..086fa321677a0b45c3e3a7471fa631c47768327a 100644 (file)
@@ -889,7 +889,7 @@ static const struct net_device_ops ems_usb_netdev_ops = {
        .ndo_start_xmit = ems_usb_start_xmit,
 };
 
-static struct can_bittiming_const ems_usb_bittiming_const = {
+static const struct can_bittiming_const ems_usb_bittiming_const = {
        .name = "ems_usb",
        .tseg1_min = 1,
        .tseg1_max = 16,
index 09b1da5bc51266b490ffc9291e675d3c368548b4..bd36e55171737734d23e75309e00b3e6142dd8b2 100644 (file)
@@ -871,7 +871,7 @@ static const struct net_device_ops esd_usb2_netdev_ops = {
        .ndo_start_xmit = esd_usb2_start_xmit,
 };
 
-static struct can_bittiming_const esd_usb2_bittiming_const = {
+static const struct can_bittiming_const esd_usb2_bittiming_const = {
        .name = "esd_usb2",
        .tseg1_min = ESD_USB2_TSEG1_MIN,
        .tseg1_max = ESD_USB2_TSEG1_MAX,
index a948c5a894011f1a297470f80dafbe9422213df3..4c775b620be287b9a08eac5ed27a8d390f1930ba 100644 (file)
@@ -45,7 +45,7 @@ struct peak_usb_adapter {
        char *name;
        u32 device_id;
        struct can_clock clock;
-       struct can_bittiming_const bittiming_const;
+       const struct can_bittiming_const bittiming_const;
        unsigned int ctrl_count;
 
        int (*intf_probe)(struct usb_interface *intf);
index ee5a771fb20d207cff444ec6f6310416713a5443..2b2fc345afca9103e6f9adf13610524b4ddf5844 100644 (file)
@@ -33,7 +33,7 @@ struct can_priv {
        struct can_device_stats can_stats;
 
        struct can_bittiming bittiming;
-       struct can_bittiming_const *bittiming_const;
+       const struct can_bittiming_const *bittiming_const;
        struct can_clock clock;
 
        enum can_state state;