From fcea115462c690ba09f9df7471d60dda0d86a4ea Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 27 Apr 2009 15:15:30 -0700 Subject: [PATCH] Staging: comedi: remove some RT code that lingered This removes some pieces of RT code that was part of the main code paths. Cc: Ian Abbott Cc: Frank Mori Hess Signed-off-by: Greg Kroah-Hartman --- drivers/staging/comedi/comedi.h | 1 - drivers/staging/comedi/comedi_fops.c | 25 ++++++------------- drivers/staging/comedi/comedidev.h | 1 - .../comedi/drivers/addi-data/addi_common.c | 19 +++++--------- .../comedi/drivers/addi-data/hwdrv_APCI1710.c | 18 ++++++------- drivers/staging/comedi/drivers/amplc_pc263.c | 2 +- 6 files changed, 24 insertions(+), 42 deletions(-) diff --git a/drivers/staging/comedi/comedi.h b/drivers/staging/comedi/comedi.h index e6b5f16edb02..8101cea84528 100644 --- a/drivers/staging/comedi/comedi.h +++ b/drivers/staging/comedi/comedi.h @@ -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 */ diff --git a/drivers/staging/comedi/comedi_fops.c b/drivers/staging/comedi/comedi_fops.c index 61b586477c10..9d7c99394ec6 100644 --- a/drivers/staging/comedi/comedi_fops.c +++ b/drivers/staging/comedi/comedi_fops.c @@ -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; diff --git a/drivers/staging/comedi/comedidev.h b/drivers/staging/comedi/comedidev.h index 0bfb58cb2936..7a1ccde83589 100644 --- a/drivers/staging/comedi/comedidev.h +++ b/drivers/staging/comedi/comedidev.h @@ -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; diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.c b/drivers/staging/comedi/drivers/addi-data/addi_common.c index df6908f68177..a56535fbcd3e 100644 --- a/drivers/staging/comedi/drivers/addi-data/addi_common.c +++ b/drivers/staging/comedi/drivers/addi-data/addi_common.c @@ -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 */ diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c index 508e19e9e0dc..47517a938ec5 100644 --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c @@ -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; diff --git a/drivers/staging/comedi/drivers/amplc_pc263.c b/drivers/staging/comedi/drivers/amplc_pc263.c index c804c7c649c1..730b67743f0e 100644 --- a/drivers/staging/comedi/drivers/amplc_pc263.c +++ b/drivers/staging/comedi/drivers/amplc_pc263.c @@ -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; -- 2.39.5