2.6.13 kernels.
#include <linux/delay.h>
#include <linux/pci.h>
+#include <linux/version.h>
#include "das08.h"
dev_list = link;
client_reg.dev_info = &dev_info;
client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
- client_reg.EventMask =
- CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
- CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
- CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
- client_reg.event_handler = &das08_pcmcia_event;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+ client_reg.EventMask =
+ CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
+ CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
+ CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
+ client_reg.event_handler = &das08_pcmcia_event;
+#endif
client_reg.Version = 0x0210;
client_reg.event_callback_args.client_data = link;
ret = pcmcia_register_client(&link->handle, &client_reg);
struct pcmcia_driver das08_cs_driver =
{
- .attach = das08_pcmcia_attach,
- .detach = das08_pcmcia_detach,
+ .attach = &das08_pcmcia_attach,
+ .detach = &das08_pcmcia_detach,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+ .event = &das08_pcmcia_event,
+#endif
.owner = THIS_MODULE,
.drv = {
.name = dev_info,
#include <linux/comedidev.h>
#include <linux/ioport.h>
+#include <linux/version.h>
#include "8255.h"
pcmcia_dev_list = link;
client_reg.dev_info = &dev_info;
client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
- client_reg.EventMask =
- CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
- CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
- CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
- client_reg.event_handler = &dio24_event;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+ client_reg.EventMask =
+ CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
+ CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
+ CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
+ client_reg.event_handler = &dio24_event;
+#endif
client_reg.Version = 0x0210;
client_reg.event_callback_args.client_data = link;
ret = pcmcia_register_client(&link->handle, &client_reg);
struct pcmcia_driver dio24_cs_driver =
{
- .attach = dio24_cs_attach,
- .detach = dio24_cs_detach,
+ .attach = &dio24_cs_attach,
+ .detach = &dio24_cs_detach,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+ .event = &dio24_event,
+#endif
.owner = THIS_MODULE,
.drv = {
.name = "ni_daq_dio24",
#include <linux/comedidev.h>
#include <linux/delay.h>
+#include <linux/version.h>
#include "8253.h"
#include "8255.h"
static comedi_driver driver_labpc_cs =
{
- driver_name: "ni_labpc_cs",
- module: THIS_MODULE,
- attach: labpc_attach,
- detach: labpc_common_detach,
- num_names: sizeof(labpc_cs_boards) / sizeof(labpc_board),
- board_name: (char **)labpc_cs_boards,
- offset: sizeof(labpc_board),
+ .driver_name = "ni_labpc_cs",
+ .module = THIS_MODULE,
+ .attach = &labpc_attach,
+ .detach = &labpc_common_detach,
+ .num_names = sizeof(labpc_cs_boards) / sizeof(labpc_board),
+ .board_name = (char **)labpc_cs_boards,
+ .offset = sizeof(labpc_board),
};
static int labpc_attach(comedi_device *dev, comedi_devconfig *it)
pcmcia_dev_list = link;
client_reg.dev_info = &dev_info;
client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
- client_reg.EventMask =
- CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
- CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
- CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
- client_reg.event_handler = &labpc_event;
- client_reg.Version = 0x0210;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+ client_reg.EventMask =
+ CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
+ CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
+ CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
+ client_reg.event_handler = &labpc_event;
+#endif
+ client_reg.Version = 0x0210;
client_reg.event_callback_args.client_data = link;
ret = pcmcia_register_client(&link->handle, &client_reg);
if (ret != CS_SUCCESS) {
{
.attach = labpc_cs_attach,
.detach = labpc_cs_detach,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+ .event = &labpc_event,
+#endif
.owner = THIS_MODULE,
.drv = {
.name = "daqcard-1200",
#include <linux/comedidev.h>
#include <linux/delay.h>
+#include <linux/version.h>
#include "ni_stc.h"
#include "8255.h"
client_reg.dev_info = &dev_info;
client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
client_reg.EventMask =
CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
client_reg.event_handler = &mio_cs_event;
+#endif
client_reg.Version = 0x0210;
client_reg.event_callback_args.client_data = link;
ret = pcmcia_register_client(&link->handle, &client_reg);
struct pcmcia_driver ni_mio_cs_driver =
{
- .attach = cs_attach,
- .detach = cs_detach,
+ .attach = &cs_attach,
+ .detach = &cs_detach,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+ .event = &mio_cs_event,
+#endif
.owner = THIS_MODULE,
.drv = {
.name = "ni_mio_cs",
#include <linux/comedidev.h>
+#include <linux/version.h>
#include <pcmcia/version.h>
#include <pcmcia/cs_types.h>
#include <pcmcia/cs.h>
/* Register with Card Services */
client_reg.dev_info = &dev_info;
client_reg.Attributes = INFO_IO_CLIENT | INFO_CARD_SHARE;
- client_reg.EventMask =
- CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
- CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
- CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
- client_reg.event_handler = &daqp_cs_event;
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+ client_reg.EventMask =
+ CS_EVENT_CARD_INSERTION | CS_EVENT_CARD_REMOVAL |
+ CS_EVENT_RESET_PHYSICAL | CS_EVENT_CARD_RESET |
+ CS_EVENT_PM_SUSPEND | CS_EVENT_PM_RESUME;
+ client_reg.event_handler = &daqp_cs_event;
+#endif
client_reg.Version = 0x0210;
client_reg.event_callback_args.client_data = link;
ret = pcmcia_register_client(&link->handle, &client_reg);
{
.attach = daqp_cs_attach,
.detach = daqp_cs_detach,
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+ .event = daqp_cs_event,
+#endif
.owner = THIS_MODULE,
.drv = {
.name = "quatech_daqp_cs",