Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 337563
b: refs/heads/master
c: 6526cd1
h: refs/heads/master
i:
  337561: 47b56b0
  337559: 66cd4f7
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Nov 1, 2012
1 parent 25fd27e commit 0a34183
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 594985d6615cc214dbfaf18fb6325d89a3c82e84
refs/heads/master: 6526cd1ad04adc2ca54d34d1f003b8bb5318d337
15 changes: 5 additions & 10 deletions trunk/drivers/staging/comedi/drivers/gsc_hpdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,6 @@ static const struct hpdi_board hpdi_boards[] = {
#endif
};

static inline struct hpdi_board *board(const struct comedi_device *dev)
{
return (struct hpdi_board *)dev->board_ptr;
}

struct hpdi_private {
/* base addresses (ioremapped) */
void __iomem *plx9080_iobase;
Expand Down Expand Up @@ -482,16 +477,19 @@ static int __devinit hpdi_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
{
struct pci_dev *pcidev = comedi_to_pci_dev(dev);
const struct hpdi_board *thisboard;
struct hpdi_private *devpriv;
int i;
int retval;

dev->board_ptr = hpdi_find_board(pcidev);
if (!dev->board_ptr) {
thisboard = hpdi_find_board(pcidev);
if (!thisboard) {
dev_err(dev->class_dev, "gsc_hpdi: pci %s not supported\n",
pci_name(pcidev));
return -EINVAL;
}
dev->board_ptr = thisboard;
dev->board_name = thisboard->name;

devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
if (!devpriv)
Expand All @@ -506,9 +504,6 @@ static int __devinit hpdi_auto_attach(struct comedi_device *dev,
dev->iobase = 1; /* the "detach" needs this */
pci_set_master(pcidev);

/* Initialize dev->board_name */
dev->board_name = board(dev)->name;

devpriv->plx9080_iobase =
ioremap(pci_resource_start(pcidev, PLX9080_BADDRINDEX),
pci_resource_len(pcidev, PLX9080_BADDRINDEX));
Expand Down

0 comments on commit 0a34183

Please sign in to comment.