diff options
author | AnilKumar Ch <anilkumar@ti.com> | 2012-08-02 09:13:09 -0400 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2012-09-21 17:58:47 -0400 |
commit | f27b1db95d047d05e8d4dd22813b1078267892f2 (patch) | |
tree | ae22b69609c9ea7468a58c73158a80adfe98b54c | |
parent | abb17e6c0c7b27693201dc85f75dbb184279fd10 (diff) |
can: c_can: Modify c_can device names
Modify c_can device names from *_CAN_DEVTYPE to BOSCH_*_CAN to make
use of same names for array indexes in c_can_id_table[] as well as
device names.
This patch also add indexes to c_can_id_table array.
Signed-off-by: AnilKumar Ch <anilkumar@ti.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
-rw-r--r-- | drivers/net/can/c_can/c_can.h | 5 | ||||
-rw-r--r-- | drivers/net/can/c_can/c_can_pci.c | 6 | ||||
-rw-r--r-- | drivers/net/can/c_can/c_can_platform.c | 18 |
3 files changed, 16 insertions, 13 deletions
diff --git a/drivers/net/can/c_can/c_can.h b/drivers/net/can/c_can/c_can.h index 01a7049ab990..4e56baa9c2da 100644 --- a/drivers/net/can/c_can/c_can.h +++ b/drivers/net/can/c_can/c_can.h | |||
@@ -143,8 +143,9 @@ static const u16 reg_map_d_can[] = { | |||
143 | }; | 143 | }; |
144 | 144 | ||
145 | enum c_can_dev_id { | 145 | enum c_can_dev_id { |
146 | C_CAN_DEVTYPE, | 146 | BOSCH_C_CAN_PLATFORM, |
147 | D_CAN_DEVTYPE, | 147 | BOSCH_C_CAN, |
148 | BOSCH_D_CAN, | ||
148 | }; | 149 | }; |
149 | 150 | ||
150 | /* c_can private data structure */ | 151 | /* c_can private data structure */ |
diff --git a/drivers/net/can/c_can/c_can_pci.c b/drivers/net/can/c_can/c_can_pci.c index 1011146ea513..3d7830bcd2bf 100644 --- a/drivers/net/can/c_can/c_can_pci.c +++ b/drivers/net/can/c_can/c_can_pci.c | |||
@@ -120,10 +120,10 @@ static int __devinit c_can_pci_probe(struct pci_dev *pdev, | |||
120 | 120 | ||
121 | /* Configure CAN type */ | 121 | /* Configure CAN type */ |
122 | switch (c_can_pci_data->type) { | 122 | switch (c_can_pci_data->type) { |
123 | case C_CAN_DEVTYPE: | 123 | case BOSCH_C_CAN: |
124 | priv->regs = reg_map_c_can; | 124 | priv->regs = reg_map_c_can; |
125 | break; | 125 | break; |
126 | case D_CAN_DEVTYPE: | 126 | case BOSCH_D_CAN: |
127 | priv->regs = reg_map_d_can; | 127 | priv->regs = reg_map_d_can; |
128 | priv->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES; | 128 | priv->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES; |
129 | break; | 129 | break; |
@@ -192,7 +192,7 @@ static void __devexit c_can_pci_remove(struct pci_dev *pdev) | |||
192 | } | 192 | } |
193 | 193 | ||
194 | static struct c_can_pci_data c_can_sta2x11= { | 194 | static struct c_can_pci_data c_can_sta2x11= { |
195 | .type = C_CAN_DEVTYPE, | 195 | .type = BOSCH_C_CAN, |
196 | .reg_align = C_CAN_REG_ALIGN_32, | 196 | .reg_align = C_CAN_REG_ALIGN_32, |
197 | .freq = 52000000, /* 52 Mhz */ | 197 | .freq = 52000000, /* 52 Mhz */ |
198 | }; | 198 | }; |
diff --git a/drivers/net/can/c_can/c_can_platform.c b/drivers/net/can/c_can/c_can_platform.c index 6ff7ad006c30..5c46d1cc5cf5 100644 --- a/drivers/net/can/c_can/c_can_platform.c +++ b/drivers/net/can/c_can/c_can_platform.c | |||
@@ -116,7 +116,7 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev) | |||
116 | priv = netdev_priv(dev); | 116 | priv = netdev_priv(dev); |
117 | id = platform_get_device_id(pdev); | 117 | id = platform_get_device_id(pdev); |
118 | switch (id->driver_data) { | 118 | switch (id->driver_data) { |
119 | case C_CAN_DEVTYPE: | 119 | case BOSCH_C_CAN: |
120 | priv->regs = reg_map_c_can; | 120 | priv->regs = reg_map_c_can; |
121 | switch (mem->flags & IORESOURCE_MEM_TYPE_MASK) { | 121 | switch (mem->flags & IORESOURCE_MEM_TYPE_MASK) { |
122 | case IORESOURCE_MEM_32BIT: | 122 | case IORESOURCE_MEM_32BIT: |
@@ -130,7 +130,7 @@ static int __devinit c_can_plat_probe(struct platform_device *pdev) | |||
130 | break; | 130 | break; |
131 | } | 131 | } |
132 | break; | 132 | break; |
133 | case D_CAN_DEVTYPE: | 133 | case BOSCH_D_CAN: |
134 | priv->regs = reg_map_d_can; | 134 | priv->regs = reg_map_d_can; |
135 | priv->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES; | 135 | priv->can.ctrlmode_supported |= CAN_CTRLMODE_3_SAMPLES; |
136 | priv->read_reg = c_can_plat_read_reg_aligned_to_16bit; | 136 | priv->read_reg = c_can_plat_read_reg_aligned_to_16bit; |
@@ -196,15 +196,17 @@ static int __devexit c_can_plat_remove(struct platform_device *pdev) | |||
196 | } | 196 | } |
197 | 197 | ||
198 | static const struct platform_device_id c_can_id_table[] = { | 198 | static const struct platform_device_id c_can_id_table[] = { |
199 | { | 199 | [BOSCH_C_CAN_PLATFORM] = { |
200 | .name = KBUILD_MODNAME, | 200 | .name = KBUILD_MODNAME, |
201 | .driver_data = C_CAN_DEVTYPE, | 201 | .driver_data = BOSCH_C_CAN, |
202 | }, { | 202 | }, |
203 | [BOSCH_C_CAN] = { | ||
203 | .name = "c_can", | 204 | .name = "c_can", |
204 | .driver_data = C_CAN_DEVTYPE, | 205 | .driver_data = BOSCH_C_CAN, |
205 | }, { | 206 | }, |
207 | [BOSCH_D_CAN] = { | ||
206 | .name = "d_can", | 208 | .name = "d_can", |
207 | .driver_data = D_CAN_DEVTYPE, | 209 | .driver_data = BOSCH_D_CAN, |
208 | }, { | 210 | }, { |
209 | } | 211 | } |
210 | }; | 212 | }; |