aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2012-10-04 15:56:19 -0400
committerDavid S. Miller <davem@davemloft.net>2012-10-04 15:56:19 -0400
commit19d4e6639fdddce3c27bc91ef91bfe473313be20 (patch)
tree9fa08f87181742b75640879d575599d07728f08a /drivers/net
parente57edf6b6dba975eceede20b4b13699d4e88cd78 (diff)
parent8cf437a0dc2acacb4efa5eb73af9067bba3d2232 (diff)
Merge branch 'fixes-for-3.7' of git://gitorious.org/linux-can/linux-can
Marc Kleine-Budde says: ==================== here are three patches for the v3.7 release cycle. Two patches by Peter Senna Tschudin which fix the return values in the error handling path of the sja1000 peak pci and pcmcia driver. And one patch by myself that fixes a compile breakage of the mpc5xxx_can mscan driver due to a section conflict. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/can/mscan/mpc5xxx_can.c8
-rw-r--r--drivers/net/can/sja1000/peak_pci.c2
-rw-r--r--drivers/net/can/sja1000/peak_pcmcia.c4
3 files changed, 9 insertions, 5 deletions
diff --git a/drivers/net/can/mscan/mpc5xxx_can.c b/drivers/net/can/mscan/mpc5xxx_can.c
index c975999bb055..799c354083c4 100644
--- a/drivers/net/can/mscan/mpc5xxx_can.c
+++ b/drivers/net/can/mscan/mpc5xxx_can.c
@@ -247,7 +247,7 @@ static u32 __devinit mpc512x_can_get_clock(struct platform_device *ofdev,
247} 247}
248#endif /* CONFIG_PPC_MPC512x */ 248#endif /* CONFIG_PPC_MPC512x */
249 249
250static struct of_device_id mpc5xxx_can_table[]; 250static const struct of_device_id mpc5xxx_can_table[];
251static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev) 251static int __devinit mpc5xxx_can_probe(struct platform_device *ofdev)
252{ 252{
253 const struct of_device_id *match; 253 const struct of_device_id *match;
@@ -380,17 +380,17 @@ static int mpc5xxx_can_resume(struct platform_device *ofdev)
380} 380}
381#endif 381#endif
382 382
383static const struct mpc5xxx_can_data __devinitdata mpc5200_can_data = { 383static const struct mpc5xxx_can_data __devinitconst mpc5200_can_data = {
384 .type = MSCAN_TYPE_MPC5200, 384 .type = MSCAN_TYPE_MPC5200,
385 .get_clock = mpc52xx_can_get_clock, 385 .get_clock = mpc52xx_can_get_clock,
386}; 386};
387 387
388static const struct mpc5xxx_can_data __devinitdata mpc5121_can_data = { 388static const struct mpc5xxx_can_data __devinitconst mpc5121_can_data = {
389 .type = MSCAN_TYPE_MPC5121, 389 .type = MSCAN_TYPE_MPC5121,
390 .get_clock = mpc512x_can_get_clock, 390 .get_clock = mpc512x_can_get_clock,
391}; 391};
392 392
393static struct of_device_id __devinitdata mpc5xxx_can_table[] = { 393static const struct of_device_id __devinitconst mpc5xxx_can_table[] = {
394 { .compatible = "fsl,mpc5200-mscan", .data = &mpc5200_can_data, }, 394 { .compatible = "fsl,mpc5200-mscan", .data = &mpc5200_can_data, },
395 /* Note that only MPC5121 Rev. 2 (and later) is supported */ 395 /* Note that only MPC5121 Rev. 2 (and later) is supported */
396 { .compatible = "fsl,mpc5121-mscan", .data = &mpc5121_can_data, }, 396 { .compatible = "fsl,mpc5121-mscan", .data = &mpc5121_can_data, },
diff --git a/drivers/net/can/sja1000/peak_pci.c b/drivers/net/can/sja1000/peak_pci.c
index f0a12962f7b6..f5b82aeb2540 100644
--- a/drivers/net/can/sja1000/peak_pci.c
+++ b/drivers/net/can/sja1000/peak_pci.c
@@ -583,12 +583,14 @@ static int __devinit peak_pci_probe(struct pci_dev *pdev,
583 cfg_base = pci_iomap(pdev, 0, PEAK_PCI_CFG_SIZE); 583 cfg_base = pci_iomap(pdev, 0, PEAK_PCI_CFG_SIZE);
584 if (!cfg_base) { 584 if (!cfg_base) {
585 dev_err(&pdev->dev, "failed to map PCI resource #0\n"); 585 dev_err(&pdev->dev, "failed to map PCI resource #0\n");
586 err = -ENOMEM;
586 goto failure_release_regions; 587 goto failure_release_regions;
587 } 588 }
588 589
589 reg_base = pci_iomap(pdev, 1, PEAK_PCI_CHAN_SIZE * channels); 590 reg_base = pci_iomap(pdev, 1, PEAK_PCI_CHAN_SIZE * channels);
590 if (!reg_base) { 591 if (!reg_base) {
591 dev_err(&pdev->dev, "failed to map PCI resource #1\n"); 592 dev_err(&pdev->dev, "failed to map PCI resource #1\n");
593 err = -ENOMEM;
592 goto failure_unmap_cfg_base; 594 goto failure_unmap_cfg_base;
593 } 595 }
594 596
diff --git a/drivers/net/can/sja1000/peak_pcmcia.c b/drivers/net/can/sja1000/peak_pcmcia.c
index ec6bd9d1b2af..272a85f32b14 100644
--- a/drivers/net/can/sja1000/peak_pcmcia.c
+++ b/drivers/net/can/sja1000/peak_pcmcia.c
@@ -686,8 +686,10 @@ static int __devinit pcan_probe(struct pcmcia_device *pdev)
686 686
687 /* detect available channels */ 687 /* detect available channels */
688 pcan_add_channels(card); 688 pcan_add_channels(card);
689 if (!card->chan_count) 689 if (!card->chan_count) {
690 err = -ENOMEM;
690 goto probe_err_4; 691 goto probe_err_4;
692 }
691 693
692 /* init the timer which controls the leds */ 694 /* init the timer which controls the leds */
693 init_timer(&card->led_timer); 695 init_timer(&card->led_timer);