Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304459
b: refs/heads/master
c: 1b18bbb
h: refs/heads/master
i:
  304457: c30f33f
  304455: a5c7c87
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 24, 2012
1 parent b15947a commit 8eedff7
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 33 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: c8d87bcc2263401e60c08611e16e6a6481f29ef4
refs/heads/master: 1b18bbb580e96af4e12788fcc1758f68a5cebf86
59 changes: 27 additions & 32 deletions trunk/drivers/staging/comedi/drivers/acl7225b.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,45 +22,13 @@ Devices: [Adlink] ACL-7225b (acl7225b), [ICP] P16R16DIO (p16r16dio)
#define ACL7225_DI_LO 2 /* Digital input low byte (DI0-DI7) */
#define ACL7225_DI_HI 3 /* Digital input high byte (DI8-DI15) */

static int acl7225b_attach(struct comedi_device *dev,
struct comedi_devconfig *it);
static int acl7225b_detach(struct comedi_device *dev);

struct boardtype {
const char *name; /* driver name */
int io_range; /* len of I/O space */
};

static const struct boardtype boardtypes[] = {
{"acl7225b", ACL7225_SIZE,},
{"p16r16dio", P16R16DIO_SIZE,},
};

#define this_board ((const struct boardtype *)dev->board_ptr)

static struct comedi_driver driver_acl7225b = {
.driver_name = "acl7225b",
.module = THIS_MODULE,
.attach = acl7225b_attach,
.detach = acl7225b_detach,
.board_name = &boardtypes[0].name,
.num_names = ARRAY_SIZE(boardtypes),
.offset = sizeof(struct boardtype),
};

static int __init driver_acl7225b_init_module(void)
{
return comedi_driver_register(&driver_acl7225b);
}

static void __exit driver_acl7225b_cleanup_module(void)
{
comedi_driver_unregister(&driver_acl7225b);
}

module_init(driver_acl7225b_init_module);
module_exit(driver_acl7225b_cleanup_module);

static int acl7225b_do_insn(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
Expand Down Expand Up @@ -161,6 +129,33 @@ static int acl7225b_detach(struct comedi_device *dev)
return 0;
}

static const struct boardtype boardtypes[] = {
{ "acl7225b", ACL7225_SIZE, },
{ "p16r16dio", P16R16DIO_SIZE, },
};

static struct comedi_driver driver_acl7225b = {
.driver_name = "acl7225b",
.module = THIS_MODULE,
.attach = acl7225b_attach,
.detach = acl7225b_detach,
.board_name = &boardtypes[0].name,
.num_names = ARRAY_SIZE(boardtypes),
.offset = sizeof(struct boardtype),
};

static int __init driver_acl7225b_init_module(void)
{
return comedi_driver_register(&driver_acl7225b);
}
module_init(driver_acl7225b_init_module);

static void __exit driver_acl7225b_cleanup_module(void)
{
comedi_driver_unregister(&driver_acl7225b);
}
module_exit(driver_acl7225b_cleanup_module);

MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver");
MODULE_LICENSE("GPL");

0 comments on commit 8eedff7

Please sign in to comment.