Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 317148
b: refs/heads/master
c: d22e930
h: refs/heads/master
v: v3
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed Jun 5, 2012
1 parent 5736123 commit f238b38
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 42 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: a6e11e3b9ffe994f1f2f8ab74ebdc9d1937c16e0
refs/heads/master: d22e9306c3e119ebc058d5b77306042d6603b231
51 changes: 10 additions & 41 deletions trunk/drivers/staging/comedi/drivers/amplc_dio200.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ struct dio200_subdev_intr {
static int dio200_attach(struct comedi_device *dev,
struct comedi_devconfig *it);
static void dio200_detach(struct comedi_device *dev);
static struct comedi_driver driver_amplc_dio200 = {
static struct comedi_driver amplc_dio200_driver = {
.driver_name = DIO200_DRIVER_NAME,
.module = THIS_MODULE,
.attach = dio200_attach,
Expand All @@ -493,58 +493,27 @@ static struct comedi_driver driver_amplc_dio200 = {
};

#if IS_ENABLED(CONFIG_COMEDI_AMPLC_DIO200_PCI)
static int __devinit driver_amplc_dio200_pci_probe(struct pci_dev *dev,
static int __devinit amplc_dio200_pci_probe(struct pci_dev *dev,
const struct pci_device_id
*ent)
{
return comedi_pci_auto_config(dev, &driver_amplc_dio200);
return comedi_pci_auto_config(dev, &amplc_dio200_driver);
}

static void __devexit driver_amplc_dio200_pci_remove(struct pci_dev *dev)
static void __devexit amplc_dio200_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}

static struct pci_driver driver_amplc_dio200_pci_driver = {
static struct pci_driver amplc_dio200_pci_driver = {
.name = DIO200_DRIVER_NAME,
.id_table = dio200_pci_table,
.probe = &driver_amplc_dio200_pci_probe,
.remove = __devexit_p(&driver_amplc_dio200_pci_remove)
.probe = &amplc_dio200_pci_probe,
.remove = __devexit_p(&amplc_dio200_pci_remove)
};

static int __init driver_amplc_dio200_init_module(void)
{
int retval;

retval = comedi_driver_register(&driver_amplc_dio200);
if (retval < 0)
return retval;

driver_amplc_dio200_pci_driver.name =
(char *)driver_amplc_dio200.driver_name;
return pci_register_driver(&driver_amplc_dio200_pci_driver);
}

static void __exit driver_amplc_dio200_cleanup_module(void)
{
pci_unregister_driver(&driver_amplc_dio200_pci_driver);
comedi_driver_unregister(&driver_amplc_dio200);
}

module_init(driver_amplc_dio200_init_module);
module_exit(driver_amplc_dio200_cleanup_module);
module_comedi_pci_driver(amplc_dio200_driver, amplc_dio200_pci_driver);
#else
static int __init driver_amplc_dio200_init_module(void)
{
return comedi_driver_register(&driver_amplc_dio200);
}

static void __exit driver_amplc_dio200_cleanup_module(void)
{
comedi_driver_unregister(&driver_amplc_dio200);
}

module_init(driver_amplc_dio200_init_module);
module_exit(driver_amplc_dio200_cleanup_module);
module_comedi_driver(amplc_dio200_driver);
#endif

/*
Expand Down

0 comments on commit f238b38

Please sign in to comment.