Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304456
b: refs/heads/master
c: db0eaee
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 24, 2012
1 parent a5c7c87 commit 8c18f1f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 23 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: d7bd1cd1478d7eb7dd21f330acb9419178edbdb3
refs/heads/master: db0eaeed6493fed37382fc98e06b2708aeaedaaa
39 changes: 17 additions & 22 deletions trunk/drivers/staging/comedi/drivers/adl_pci7296.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,30 +48,13 @@ Configuration Options:

#define PCI_DEVICE_ID_PCI7296 0x7296

static DEFINE_PCI_DEVICE_TABLE(adl_pci7296_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADLINK, PCI_DEVICE_ID_PCI7296) },
{0}
};

MODULE_DEVICE_TABLE(pci, adl_pci7296_pci_table);

struct adl_pci7296_private {
int data;
struct pci_dev *pci_dev;
};

#define devpriv ((struct adl_pci7296_private *)dev->private)

static int adl_pci7296_attach(struct comedi_device *dev,
struct comedi_devconfig *it);
static int adl_pci7296_detach(struct comedi_device *dev);
static struct comedi_driver driver_adl_pci7296 = {
.driver_name = "adl_pci7296",
.module = THIS_MODULE,
.attach = adl_pci7296_attach,
.detach = adl_pci7296_detach,
};

static int adl_pci7296_attach(struct comedi_device *dev,
struct comedi_devconfig *it)
{
Expand Down Expand Up @@ -172,6 +155,13 @@ static int adl_pci7296_detach(struct comedi_device *dev)
return 0;
}

static struct comedi_driver driver_adl_pci7296 = {
.driver_name = "adl_pci7296",
.module = THIS_MODULE,
.attach = adl_pci7296_attach,
.detach = adl_pci7296_detach,
};

static int __devinit driver_adl_pci7296_pci_probe(struct pci_dev *dev,
const struct pci_device_id
*ent)
Expand All @@ -184,10 +174,16 @@ static void __devexit driver_adl_pci7296_pci_remove(struct pci_dev *dev)
comedi_pci_auto_unconfig(dev);
}

static DEFINE_PCI_DEVICE_TABLE(adl_pci7296_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADLINK, PCI_DEVICE_ID_PCI7296) },
{0}
};
MODULE_DEVICE_TABLE(pci, adl_pci7296_pci_table);

static struct pci_driver driver_adl_pci7296_pci_driver = {
.id_table = adl_pci7296_pci_table,
.probe = &driver_adl_pci7296_pci_probe,
.remove = __devexit_p(&driver_adl_pci7296_pci_remove)
.id_table = adl_pci7296_pci_table,
.probe = driver_adl_pci7296_pci_probe,
.remove = __devexit_p(driver_adl_pci7296_pci_remove)
};

static int __init driver_adl_pci7296_init_module(void)
Expand All @@ -202,14 +198,13 @@ static int __init driver_adl_pci7296_init_module(void)
(char *)driver_adl_pci7296.driver_name;
return pci_register_driver(&driver_adl_pci7296_pci_driver);
}
module_init(driver_adl_pci7296_init_module);

static void __exit driver_adl_pci7296_cleanup_module(void)
{
pci_unregister_driver(&driver_adl_pci7296_pci_driver);
comedi_driver_unregister(&driver_adl_pci7296);
}

module_init(driver_adl_pci7296_init_module);
module_exit(driver_adl_pci7296_cleanup_module);

MODULE_AUTHOR("Comedi http://www.comedi.org");
Expand Down

0 comments on commit 8c18f1f

Please sign in to comment.