Skip to content

Commit

Permalink
can: some fixes and cleanups to the initial device driver interface
Browse files Browse the repository at this point in the history
This patch fixes a few errors sneaked into the initial version of the
device driver interface.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Wolfgang Grandegger authored and David S. Miller committed Jun 1, 2009
1 parent 86d15cd commit 128ced8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion drivers/net/can/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ int open_candev(struct net_device *dev)

return 0;
}
EXPORT_SYMBOL(open_candev);
EXPORT_SYMBOL_GPL(open_candev);

/*
* Common close function for cleanup before the device gets closed.
Expand Down
3 changes: 0 additions & 3 deletions drivers/net/can/sja1000/ems_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,14 +218,12 @@ static int __devinit ems_pci_add_card(struct pci_dev *pdev,
card->conf_addr = pci_iomap(pdev, 0, EMS_PCI_MEM_SIZE);
if (card->conf_addr == NULL) {
err = -ENOMEM;

goto failure_cleanup;
}

card->base_addr = pci_iomap(pdev, 1, EMS_PCI_MEM_SIZE);
if (card->base_addr == NULL) {
err = -ENOMEM;

goto failure_cleanup;
}

Expand All @@ -239,7 +237,6 @@ static int __devinit ems_pci_add_card(struct pci_dev *pdev,
ems_pci_readb(card, 3) != 0xCB ||
ems_pci_readb(card, 4) != 0x11) {
dev_err(&pdev->dev, "Not EMS Dr. Thomas Wuensche interface\n");

err = -ENODEV;
goto failure_cleanup;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/sja1000/sja1000.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,8 @@ static int sja1000_open(struct net_device *dev)
err = request_irq(dev->irq, &sja1000_interrupt, priv->irq_flags,
dev->name, (void *)dev);
if (err) {
return -EAGAIN;
close_candev(dev);
return -EAGAIN;
}
}

Expand Down

0 comments on commit 128ced8

Please sign in to comment.