浏览代码

can: c_can_pci: make c_can_pci_data const

Make c_can_pci_data structures const as they are only used during
a copy operation.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Bhumika Goyal 8 年之前
父节点
当前提交
a4efd5d8a4
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      drivers/net/can/c_can/c_can_pci.c

+ 2 - 2
drivers/net/can/c_can/c_can_pci.c

@@ -251,14 +251,14 @@ static void c_can_pci_remove(struct pci_dev *pdev)
 	pci_disable_device(pdev);
 	pci_disable_device(pdev);
 }
 }
 
 
-static struct c_can_pci_data c_can_sta2x11= {
+static const struct c_can_pci_data c_can_sta2x11= {
 	.type = BOSCH_C_CAN,
 	.type = BOSCH_C_CAN,
 	.reg_align = C_CAN_REG_ALIGN_32,
 	.reg_align = C_CAN_REG_ALIGN_32,
 	.freq = 52000000, /* 52 Mhz */
 	.freq = 52000000, /* 52 Mhz */
 	.bar = 0,
 	.bar = 0,
 };
 };
 
 
-static struct c_can_pci_data c_can_pch = {
+static const struct c_can_pci_data c_can_pch = {
 	.type = BOSCH_C_CAN,
 	.type = BOSCH_C_CAN,
 	.reg_align = C_CAN_REG_32,
 	.reg_align = C_CAN_REG_32,
 	.freq = 50000000, /* 50 MHz */
 	.freq = 50000000, /* 50 MHz */