Staging: comedi: remove some RT code that lingered
authorGreg Kroah-Hartman <gregkh@suse.de>
Mon, 27 Apr 2009 22:15:30 +0000 (15:15 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 19 Jun 2009 18:00:33 +0000 (11:00 -0700)
This removes some pieces of RT code that was part of the main code
paths.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/comedi/comedi.h
drivers/staging/comedi/comedi_fops.c
drivers/staging/comedi/comedidev.h
drivers/staging/comedi/drivers/addi-data/addi_common.c
drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c
drivers/staging/comedi/drivers/amplc_pc263.c

index e6b5f16edb02d96e0e15cd95ee38d7d3c5350349..8101cea84528b375aa5e596ba9852fed87a0b9e2 100644 (file)
@@ -188,7 +188,6 @@ extern "C" {
 #define SDF_WRITABLE   0x00020000      /* subdevice can be written (e.g. analog output) */
 #define SDF_WRITEABLE  SDF_WRITABLE    /* spelling error in API */
 #define SDF_INTERNAL   0x00040000      /* subdevice does not have externally visible lines */
-#define SDF_RT         0x00080000      /* DEPRECATED: subdevice is RT capable */
 #define SDF_GROUND     0x00100000      /* can do aref=ground */
 #define SDF_COMMON     0x00200000      /* can do aref=common */
 #define SDF_DIFF       0x00400000      /* can do aref=diff */
index 61b586477c10ecd51f2753d07f79dfbfb68ee4fd..9d7c99394ec6767a2cef94408a7913a63d6a5ec0 100644 (file)
@@ -1998,27 +1998,18 @@ void comedi_event(struct comedi_device *dev, struct comedi_subdevice *s)
 
        if (async->cb_mask & s->async->events) {
                if (comedi_get_subdevice_runflags(s) & SRF_USER) {
-                       if (dev->rt) {
-                               printk("BUG: comedi_event() code unreachable\n");
-                       } else {
-                               wake_up_interruptible(&async->wait_head);
-                               if (s->subdev_flags & SDF_CMD_READ) {
-                                       kill_fasync(&dev->async_queue, SIGIO,
-                                                   POLL_IN);
-                               }
-                               if (s->subdev_flags & SDF_CMD_WRITE) {
-                                       kill_fasync(&dev->async_queue, SIGIO,
-                                                   POLL_OUT);
-                               }
+                       wake_up_interruptible(&async->wait_head);
+                       if (s->subdev_flags & SDF_CMD_READ) {
+                               kill_fasync(&dev->async_queue, SIGIO,
+                                           POLL_IN);
+                       }
+                       if (s->subdev_flags & SDF_CMD_WRITE) {
+                               kill_fasync(&dev->async_queue, SIGIO,
+                                           POLL_OUT);
                        }
                } else {
                        if (async->cb_func)
                                async->cb_func(s->async->events, async->cb_arg);
-                       /* XXX bug here.  If subdevice A is rt, and
-                        * subdevice B tries to callback to a normal
-                        * linux kernel function, it will be at the
-                        * wrong priority.  Since this isn't very
-                        * common, I'm not going to worry about it. */
                }
        }
        s->async->events = 0;
index 0bfb58cb29362c14d4eda046eaf0d85383fba154..7a1ccde8358901896221461dff3a4fed2c28efc5 100644 (file)
@@ -263,7 +263,6 @@ struct comedi_device {
        const char *board_name;
        const void *board_ptr;
        int attached;
-       int rt;
        spinlock_t spinlock;
        struct mutex mutex;
        int in_request_module;
index df6908f6817778a999e77168fc6bcf5f259323cb..a56535fbcd3e85bc57aeabd66feae14efe73ff36 100644 (file)
@@ -2757,7 +2757,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
                        dev->read_subdev = s;
                        s->type = COMEDI_SUBD_AI;
                        s->subdev_flags =
-                               SDF_READABLE | SDF_RT | SDF_COMMON | SDF_GROUND
+                               SDF_READABLE | SDF_COMMON | SDF_GROUND
                                | SDF_DIFF;
                        if (this_board->i_NbrAiChannel) {
                                s->n_chan = this_board->i_NbrAiChannel;
@@ -2792,9 +2792,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
                s = dev->subdevices + 1;
                if (this_board->i_NbrAoChannel) {
                        s->type = COMEDI_SUBD_AO;
-                       s->subdev_flags =
-                               SDF_WRITEABLE | SDF_GROUND | SDF_COMMON |
-                               SDF_RT;
+                       s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
                        s->n_chan = this_board->i_NbrAoChannel;
                        s->maxdata = this_board->i_AoMaxdata;
                        s->len_chanlist = this_board->i_NbrAoChannel;
@@ -2810,8 +2808,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
                s = dev->subdevices + 2;
                if (this_board->i_NbrDiChannel) {
                        s->type = COMEDI_SUBD_DI;
-                       s->subdev_flags =
-                               SDF_READABLE | SDF_RT | SDF_GROUND | SDF_COMMON;
+                       s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_COMMON;
                        s->n_chan = this_board->i_NbrDiChannel;
                        s->maxdata = 1;
                        s->len_chanlist = this_board->i_NbrDiChannel;
@@ -2831,8 +2828,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
                if (this_board->i_NbrDoChannel) {
                        s->type = COMEDI_SUBD_DO;
                        s->subdev_flags =
-                               SDF_READABLE | SDF_WRITEABLE | SDF_RT |
-                               SDF_GROUND | SDF_COMMON;
+                               SDF_READABLE | SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
                        s->n_chan = this_board->i_NbrDoChannel;
                        s->maxdata = this_board->i_DoMaxdata;
                        s->len_chanlist = this_board->i_NbrDoChannel;
@@ -2854,9 +2850,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
                s = dev->subdevices + 4;
                if (this_board->i_Timer) {
                        s->type = COMEDI_SUBD_TIMER;
-                       s->subdev_flags =
-                               SDF_WRITEABLE | SDF_RT | SDF_GROUND |
-                               SDF_COMMON;
+                       s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
                        s->n_chan = 1;
                        s->maxdata = 0;
                        s->len_chanlist = 1;
@@ -2875,8 +2869,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
                if (this_board->i_NbrTTLChannel) {
                        s->type = COMEDI_SUBD_TTLIO;
                        s->subdev_flags =
-                               SDF_WRITEABLE | SDF_READABLE | SDF_RT |
-                               SDF_GROUND | SDF_COMMON;
+                               SDF_WRITEABLE | SDF_READABLE | SDF_GROUND | SDF_COMMON;
                        s->n_chan = this_board->i_NbrTTLChannel;
                        s->maxdata = 1;
                        s->io_bits = 0; /* all bits input */
index 508e19e9e0dcf4ea5ab63d992cd0e3145fd5a1d0..47517a938ec5b3e28d7dccdd034eb7cd879395ab 100644 (file)
@@ -71,7 +71,7 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
        s = dev->subdevices + 0;
 
        s->type = COMEDI_SUBD_TIMER;
-       s->subdev_flags = SDF_WRITEABLE | SDF_RT | SDF_GROUND | SDF_COMMON;
+       s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
        s->n_chan = 3;
        s->maxdata = 0;
        s->len_chanlist = 3;
@@ -86,7 +86,7 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
 
        s->type = COMEDI_SUBD_DIO;
        s->subdev_flags =
-               SDF_WRITEABLE | SDF_READABLE | SDF_RT | SDF_GROUND | SDF_COMMON;
+               SDF_WRITEABLE | SDF_READABLE | SDF_GROUND | SDF_COMMON;
        s->n_chan = 7;
        s->maxdata = 1;
        s->len_chanlist = 7;
@@ -100,7 +100,7 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
        s = dev->subdevices + 2;
 
        s->type = COMEDI_SUBD_CHRONO;
-       s->subdev_flags = SDF_WRITEABLE | SDF_RT | SDF_GROUND | SDF_COMMON;
+       s->subdev_flags = SDF_WRITEABLE | SDF_GROUND | SDF_COMMON;
        s->n_chan = 4;
        s->maxdata = 0;
        s->len_chanlist = 4;
@@ -114,7 +114,7 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
        s = dev->subdevices + 3;
        s->type = COMEDI_SUBD_PWM;
        s->subdev_flags =
-               SDF_WRITEABLE | SDF_READABLE | SDF_RT | SDF_GROUND | SDF_COMMON;
+               SDF_WRITEABLE | SDF_READABLE | SDF_GROUND | SDF_COMMON;
        s->n_chan = 3;
        s->maxdata = 1;
        s->len_chanlist = 3;
@@ -129,7 +129,7 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
        s = dev->subdevices + 4;
        s->type = COMEDI_SUBD_TTLIO;
        s->subdev_flags =
-               SDF_WRITEABLE | SDF_READABLE | SDF_RT | SDF_GROUND | SDF_COMMON;
+               SDF_WRITEABLE | SDF_READABLE | SDF_GROUND | SDF_COMMON;
        s->n_chan = 8;
        s->maxdata = 1;
        s->len_chanlist = 8;
@@ -143,7 +143,7 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
        s = dev->subdevices + 5;
        s->type = COMEDI_SUBD_TOR;
        s->subdev_flags =
-               SDF_WRITEABLE | SDF_READABLE | SDF_RT | SDF_GROUND | SDF_COMMON;
+               SDF_WRITEABLE | SDF_READABLE | SDF_GROUND | SDF_COMMON;
        s->n_chan = 8;
        s->maxdata = 1;
        s->len_chanlist = 8;
@@ -158,7 +158,7 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
        s = dev->subdevices + 6;
        s->type = COMEDI_SUBD_SSI;
        s->subdev_flags =
-               SDF_WRITEABLE | SDF_READABLE | SDF_RT | SDF_GROUND | SDF_COMMON;
+               SDF_WRITEABLE | SDF_READABLE | SDF_GROUND | SDF_COMMON;
        s->n_chan = 4;
        s->maxdata = 1;
        s->len_chanlist = 4;
@@ -171,7 +171,7 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
        s = dev->subdevices + 7;
        s->type = COMEDI_SUBD_PULSEENCODER;
        s->subdev_flags =
-               SDF_WRITEABLE | SDF_READABLE | SDF_RT | SDF_GROUND | SDF_COMMON;
+               SDF_WRITEABLE | SDF_READABLE | SDF_GROUND | SDF_COMMON;
        s->n_chan = 4;
        s->maxdata = 1;
        s->len_chanlist = 4;
@@ -185,7 +185,7 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
        s = dev->subdevices + 8;
        s->type = COMEDI_SUBD_INCREMENTALCOUNTER;
        s->subdev_flags =
-               SDF_WRITEABLE | SDF_READABLE | SDF_RT | SDF_GROUND | SDF_COMMON;
+               SDF_WRITEABLE | SDF_READABLE | SDF_GROUND | SDF_COMMON;
        s->n_chan = 500;
        s->maxdata = 1;
        s->len_chanlist = 500;
index c804c7c649c184c5e852dc5a34dda573f3540e1a..730b67743f0e355985ceb6c6da2ce4244d594f8d 100644 (file)
@@ -307,7 +307,7 @@ static int pc263_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        s = dev->subdevices + 0;
        /* digital i/o subdevice */
        s->type = COMEDI_SUBD_DIO;
-       s->subdev_flags = SDF_READABLE | SDF_WRITABLE | SDF_RT;
+       s->subdev_flags = SDF_READABLE | SDF_WRITABLE;
        s->n_chan = 16;
        s->maxdata = 1;
        s->range_table = &range_digital;