Skip to content

Commit

Permalink
staging: comedi: amplc_pci230: use auto_attach() hook
Browse files Browse the repository at this point in the history
Use the new `auto_attach()` hook in the `struct comedi_driver` instead
of the old `attach_pci()` hook.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Oct 29, 2012
1 parent 392ba7b commit 1ed1b3d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/staging/comedi/drivers/amplc_pci230.c
Original file line number Diff line number Diff line change
Expand Up @@ -2843,9 +2843,10 @@ static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it)
return pci230_attach_common(dev, pci_dev);
}

static int __devinit pci230_attach_pci(struct comedi_device *dev,
struct pci_dev *pci_dev)
static int __devinit pci230_auto_attach(struct comedi_device *dev,
unsigned long context_unused)
{
struct pci_dev *pci_dev = comedi_to_pci_dev(dev);
int rc;

dev_info(dev->class_dev, "amplc_pci230: attach pci %s\n",
Expand Down Expand Up @@ -2891,7 +2892,7 @@ static struct comedi_driver amplc_pci230_driver = {
.driver_name = "amplc_pci230",
.module = THIS_MODULE,
.attach = pci230_attach,
.attach_pci = pci230_attach_pci,
.auto_attach = pci230_auto_attach,
.detach = pci230_detach,
.board_name = &pci230_boards[0].name,
.offset = sizeof(pci230_boards[0]),
Expand Down

0 comments on commit 1ed1b3d

Please sign in to comment.