Commit 194b9a4c authored by Marc Kleine-Budde's avatar Marc Kleine-Budde

can: mark bittiming_const pointer in struct can_priv as const

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: default avatarMarc Kleine-Budde <mkl@pengutronix.de>
parent 769162e3
...@@ -170,7 +170,7 @@ static const struct at91_devtype_data at91_devtype_data[] __devinitconst = { ...@@ -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, .name = KBUILD_MODNAME,
.tseg1_min = 4, .tseg1_min = 4,
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -44,7 +44,7 @@ struct bfin_can_priv { ...@@ -44,7 +44,7 @@ struct bfin_can_priv {
/* /*
* bfin can timing parameters * 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, .name = DRV_NAME,
.tseg1_min = 1, .tseg1_min = 1,
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -189,7 +189,7 @@ enum c_can_bus_error_types { ...@@ -189,7 +189,7 @@ enum c_can_bus_error_types {
C_CAN_ERROR_PASSIVE, 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, .name = KBUILD_MODNAME,
.tseg1_min = 2, /* Time segment 1 = prop_seg + phase_seg1 */ .tseg1_min = 2, /* Time segment 1 = prop_seg + phase_seg1 */
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -90,7 +90,7 @@ static unsigned char cc770_obj_flags[CC770_OBJ_MAX] = { ...@@ -90,7 +90,7 @@ static unsigned char cc770_obj_flags[CC770_OBJ_MAX] = {
[CC770_OBJ_TX] = 0, [CC770_OBJ_TX] = 0,
}; };
static struct can_bittiming_const cc770_bittiming_const = { static const struct can_bittiming_const cc770_bittiming_const = {
.name = KBUILD_MODNAME, .name = KBUILD_MODNAME,
.tseg1_min = 1, .tseg1_min = 1,
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -203,7 +203,7 @@ static struct flexcan_devtype_data fsl_imx6q_devtype_data = { ...@@ -203,7 +203,7 @@ static struct flexcan_devtype_data fsl_imx6q_devtype_data = {
.hw_ver = 10, .hw_ver = 10,
}; };
static struct can_bittiming_const flexcan_bittiming_const = { static const struct can_bittiming_const flexcan_bittiming_const = {
.name = DRV_NAME, .name = DRV_NAME,
.tseg1_min = 4, .tseg1_min = 4,
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -1490,7 +1490,7 @@ static const struct net_device_ops ican3_netdev_ops = { ...@@ -1490,7 +1490,7 @@ static const struct net_device_ops ican3_netdev_ops = {
*/ */
/* This structure was stolen from drivers/net/can/sja1000/sja1000.c */ /* 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, .name = DRV_NAME,
.tseg1_min = 1, .tseg1_min = 1,
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -214,7 +214,7 @@ static int mcp251x_enable_dma; /* Enable SPI DMA. Default: 0 (Off) */ ...@@ -214,7 +214,7 @@ static int mcp251x_enable_dma; /* Enable SPI DMA. Default: 0 (Off) */
module_param(mcp251x_enable_dma, int, S_IRUGO); module_param(mcp251x_enable_dma, int, S_IRUGO);
MODULE_PARM_DESC(mcp251x_enable_dma, "Enable SPI DMA. Default: 0 (Off)"); 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, .name = DEVICE_NAME,
.tseg1_min = 3, .tseg1_min = 3,
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
#include "mscan.h" #include "mscan.h"
static struct can_bittiming_const mscan_bittiming_const = { static const struct can_bittiming_const mscan_bittiming_const = {
.name = "mscan", .name = "mscan",
.tseg1_min = 4, .tseg1_min = 4,
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -184,7 +184,7 @@ struct pch_can_priv { ...@@ -184,7 +184,7 @@ struct pch_can_priv {
int use_msi; 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, .name = KBUILD_MODNAME,
.tseg1_min = 2, .tseg1_min = 2,
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -69,7 +69,7 @@ MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>"); ...@@ -69,7 +69,7 @@ MODULE_AUTHOR("Oliver Hartkopp <oliver.hartkopp@volkswagen.de>");
MODULE_LICENSE("Dual BSD/GPL"); MODULE_LICENSE("Dual BSD/GPL");
MODULE_DESCRIPTION(DRV_NAME "CAN netdevice driver"); 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, .name = DRV_NAME,
.tseg1_min = 1, .tseg1_min = 1,
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -196,7 +196,7 @@ MODULE_VERSION(HECC_MODULE_VERSION); ...@@ -196,7 +196,7 @@ MODULE_VERSION(HECC_MODULE_VERSION);
#define HECC_CANGIM_SIL BIT(2) /* system interrupts to int line 1 */ #define HECC_CANGIM_SIL BIT(2) /* system interrupts to int line 1 */
/* CAN Bittiming constants as per HECC specs */ /* 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, .name = DRV_NAME,
.tseg1_min = 1, .tseg1_min = 1,
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -889,7 +889,7 @@ static const struct net_device_ops ems_usb_netdev_ops = { ...@@ -889,7 +889,7 @@ static const struct net_device_ops ems_usb_netdev_ops = {
.ndo_start_xmit = ems_usb_start_xmit, .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", .name = "ems_usb",
.tseg1_min = 1, .tseg1_min = 1,
.tseg1_max = 16, .tseg1_max = 16,
......
...@@ -871,7 +871,7 @@ static const struct net_device_ops esd_usb2_netdev_ops = { ...@@ -871,7 +871,7 @@ static const struct net_device_ops esd_usb2_netdev_ops = {
.ndo_start_xmit = esd_usb2_start_xmit, .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", .name = "esd_usb2",
.tseg1_min = ESD_USB2_TSEG1_MIN, .tseg1_min = ESD_USB2_TSEG1_MIN,
.tseg1_max = ESD_USB2_TSEG1_MAX, .tseg1_max = ESD_USB2_TSEG1_MAX,
......
...@@ -45,7 +45,7 @@ struct peak_usb_adapter { ...@@ -45,7 +45,7 @@ struct peak_usb_adapter {
char *name; char *name;
u32 device_id; u32 device_id;
struct can_clock clock; struct can_clock clock;
struct can_bittiming_const bittiming_const; const struct can_bittiming_const bittiming_const;
unsigned int ctrl_count; unsigned int ctrl_count;
int (*intf_probe)(struct usb_interface *intf); int (*intf_probe)(struct usb_interface *intf);
......
...@@ -33,7 +33,7 @@ struct can_priv { ...@@ -33,7 +33,7 @@ struct can_priv {
struct can_device_stats can_stats; struct can_device_stats can_stats;
struct can_bittiming bittiming; struct can_bittiming bittiming;
struct can_bittiming_const *bittiming_const; const struct can_bittiming_const *bittiming_const;
struct can_clock clock; struct can_clock clock;
enum can_state state; enum can_state state;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment