You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Staging: comedi: remove RT code
This removes the unused RT code from the comedi subsystem. A lot of drivers needed to then include interrupt.h on their own, as they were picking it up through the comedi_rt.h inclusion. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
@@ -13,13 +13,6 @@ config COMEDI_DEBUG
|
||||
This is an option for use by developers; most people should
|
||||
say N here. This enables comedi core and driver debugging.
|
||||
|
||||
config COMEDI_RT
|
||||
tristate "Comedi Real-time support"
|
||||
depends on COMEDI && RT
|
||||
default N
|
||||
---help---
|
||||
Enable Real time support for the Comedi core.
|
||||
|
||||
config COMEDI_PCI_DRIVERS
|
||||
tristate "Comedi PCI drivers"
|
||||
depends on COMEDI && PCI
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
obj-$(CONFIG_COMEDI) += comedi.o
|
||||
obj-$(CONFIG_COMEDI_RT) += comedi_rt.o
|
||||
|
||||
obj-$(CONFIG_COMEDI) += kcomedilib/
|
||||
obj-$(CONFIG_COMEDI) += drivers/
|
||||
@@ -11,7 +10,3 @@ comedi-objs := \
|
||||
drivers.o \
|
||||
comedi_compat32.o \
|
||||
comedi_ksyms.o \
|
||||
|
||||
comedi_rt-objs := \
|
||||
rt_pend_tq.o \
|
||||
rt.o
|
||||
|
||||
@@ -1079,13 +1079,6 @@ static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file)
|
||||
|
||||
comedi_set_subdevice_runflags(s, ~0, SRF_USER | SRF_RUNNING);
|
||||
|
||||
#ifdef CONFIG_COMEDI_RT
|
||||
if (async->cmd.flags & TRIG_RT) {
|
||||
if (comedi_switch_to_rt(dev) == 0)
|
||||
comedi_set_subdevice_runflags(s, SRF_RT, SRF_RT);
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = s->do_cmd(dev, s);
|
||||
if (ret == 0)
|
||||
return 0;
|
||||
@@ -1720,12 +1713,6 @@ void do_become_nonbusy(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
struct comedi_async *async = s->async;
|
||||
|
||||
comedi_set_subdevice_runflags(s, SRF_RUNNING, 0);
|
||||
#ifdef CONFIG_COMEDI_RT
|
||||
if (comedi_get_subdevice_runflags(s) & SRF_RT) {
|
||||
comedi_switch_to_non_rt(dev);
|
||||
comedi_set_subdevice_runflags(s, SRF_RT, 0);
|
||||
}
|
||||
#endif
|
||||
if (async) {
|
||||
comedi_reset_async_buf(async);
|
||||
async->inttrig = NULL;
|
||||
@@ -1952,8 +1939,6 @@ static int __init comedi_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
comedi_rt_init();
|
||||
|
||||
comedi_register_ioctl32();
|
||||
|
||||
return 0;
|
||||
@@ -1974,8 +1959,6 @@ static void __exit comedi_cleanup(void)
|
||||
|
||||
comedi_proc_cleanup();
|
||||
|
||||
comedi_rt_cleanup();
|
||||
|
||||
comedi_unregister_ioctl32();
|
||||
}
|
||||
|
||||
@@ -2015,15 +1998,8 @@ 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) {
|
||||
#ifdef CONFIG_COMEDI_RT
|
||||
/* pend wake up */
|
||||
comedi_rt_pend_wakeup(&async->wait_head);
|
||||
#else
|
||||
printk
|
||||
("BUG: comedi_event() code unreachable\n");
|
||||
#endif
|
||||
printk("BUG: comedi_event() code unreachable\n");
|
||||
} else {
|
||||
wake_up_interruptible(&async->wait_head);
|
||||
if (s->subdev_flags & SDF_CMD_READ) {
|
||||
|
||||
@@ -46,13 +46,6 @@ EXPORT_SYMBOL(range_bipolar2_5);
|
||||
EXPORT_SYMBOL(range_unipolar10);
|
||||
EXPORT_SYMBOL(range_unipolar5);
|
||||
EXPORT_SYMBOL(range_unknown);
|
||||
#ifdef CONFIG_COMEDI_RT
|
||||
EXPORT_SYMBOL(comedi_free_irq);
|
||||
EXPORT_SYMBOL(comedi_request_irq);
|
||||
EXPORT_SYMBOL(comedi_switch_to_rt);
|
||||
EXPORT_SYMBOL(comedi_switch_to_non_rt);
|
||||
EXPORT_SYMBOL(rt_pend_call);
|
||||
#endif
|
||||
#ifdef CONFIG_COMEDI_DEBUG
|
||||
EXPORT_SYMBOL(comedi_debug);
|
||||
#endif
|
||||
|
||||
@@ -1,150 +0,0 @@
|
||||
/*
|
||||
module/comedi_rt.h
|
||||
header file for real-time structures, variables, and constants
|
||||
|
||||
COMEDI - Linux Control and Measurement Device Interface
|
||||
Copyright (C) 1997-2000 David A. Schleef <ds@schleef.org>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
*/
|
||||
|
||||
#ifndef _COMEDI_RT_H
|
||||
#define _COMEDI_RT_H
|
||||
|
||||
#ifndef _COMEDIDEV_H
|
||||
#error comedi_rt.h should only be included by comedidev.h
|
||||
#endif
|
||||
|
||||
#include <linux/kdev_t.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#ifdef CONFIG_COMEDI_RT
|
||||
|
||||
#ifdef CONFIG_COMEDI_RTAI
|
||||
#include <rtai.h>
|
||||
#include <rtai_sched.h>
|
||||
#include <rtai_version.h>
|
||||
#endif
|
||||
#ifdef CONFIG_COMEDI_RTL
|
||||
#include <rtl_core.h>
|
||||
#include <rtl_time.h>
|
||||
/* #ifdef RTLINUX_VERSION_CODE */
|
||||
#include <rtl_sync.h>
|
||||
/* #endif */
|
||||
#define rt_printk rtl_printf
|
||||
#endif
|
||||
#ifdef CONFIG_COMEDI_FUSION
|
||||
#define rt_printk(format, args...) printk(format , ## args)
|
||||
#endif /* CONFIG_COMEDI_FUSION */
|
||||
#ifdef CONFIG_PRIORITY_IRQ
|
||||
#define rt_printk printk
|
||||
#endif
|
||||
|
||||
int comedi_request_irq(unsigned int irq, irq_handler_t handler,
|
||||
unsigned long flags, const char *device,
|
||||
struct comedi_device *dev_id);
|
||||
void comedi_free_irq(unsigned int irq, struct comedi_device *dev_id);
|
||||
void comedi_rt_init(void);
|
||||
void comedi_rt_cleanup(void);
|
||||
int comedi_switch_to_rt(struct comedi_device *dev);
|
||||
void comedi_switch_to_non_rt(struct comedi_device *dev);
|
||||
void comedi_rt_pend_wakeup(wait_queue_head_t *q);
|
||||
extern int rt_pend_call(void (*func) (int arg1, void *arg2), int arg1,
|
||||
void *arg2);
|
||||
|
||||
#else
|
||||
|
||||
#define comedi_request_irq(a, b, c, d, e) request_irq(a, b, c, d, e)
|
||||
#define comedi_free_irq(a, b) free_irq(a, b)
|
||||
#define comedi_rt_init() do {} while (0)
|
||||
#define comedi_rt_cleanup() do {} while (0)
|
||||
#define comedi_switch_to_rt(a) (-1)
|
||||
#define comedi_switch_to_non_rt(a) do {} while (0)
|
||||
#define comedi_rt_pend_wakeup(a) do {} while (0)
|
||||
|
||||
#define rt_printk(format, args...) printk(format, ##args)
|
||||
|
||||
#endif
|
||||
|
||||
/* Define a spin_lock_irqsave function that will work with rt or without.
|
||||
* Use inline functions instead of just macros to enforce some type checking.
|
||||
*/
|
||||
#define comedi_spin_lock_irqsave(lock_ptr, flags) \
|
||||
(flags = __comedi_spin_lock_irqsave(lock_ptr))
|
||||
|
||||
static inline unsigned long __comedi_spin_lock_irqsave(spinlock_t *lock_ptr)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
#if defined(CONFIG_COMEDI_RTAI)
|
||||
flags = rt_spin_lock_irqsave(lock_ptr);
|
||||
|
||||
#elif defined(CONFIG_COMEDI_RTL)
|
||||
rtl_spin_lock_irqsave(lock_ptr, flags);
|
||||
|
||||
#elif defined(CONFIG_COMEDI_RTL_V1)
|
||||
rtl_spin_lock_irqsave(lock_ptr, flags);
|
||||
|
||||
#elif defined(CONFIG_COMEDI_FUSION)
|
||||
rthal_spin_lock_irqsave(lock_ptr, flags);
|
||||
#else
|
||||
spin_lock_irqsave(lock_ptr, flags);
|
||||
|
||||
#endif
|
||||
|
||||
return flags;
|
||||
}
|
||||
|
||||
static inline void comedi_spin_unlock_irqrestore(spinlock_t *lock_ptr,
|
||||
unsigned long flags)
|
||||
{
|
||||
|
||||
#if defined(CONFIG_COMEDI_RTAI)
|
||||
rt_spin_unlock_irqrestore(flags, lock_ptr);
|
||||
|
||||
#elif defined(CONFIG_COMEDI_RTL)
|
||||
rtl_spin_unlock_irqrestore(lock_ptr, flags);
|
||||
|
||||
#elif defined(CONFIG_COMEDI_RTL_V1)
|
||||
rtl_spin_unlock_irqrestore(lock_ptr, flags);
|
||||
#elif defined(CONFIG_COMEDI_FUSION)
|
||||
rthal_spin_unlock_irqrestore(lock_ptr, flags);
|
||||
#else
|
||||
spin_unlock_irqrestore(lock_ptr, flags);
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
/* define a RT safe udelay */
|
||||
static inline void comedi_udelay(unsigned int usec)
|
||||
{
|
||||
#if defined(CONFIG_COMEDI_RTAI)
|
||||
static const int nanosec_per_usec = 1000;
|
||||
rt_busy_sleep(usec * nanosec_per_usec);
|
||||
#elif defined(CONFIG_COMEDI_RTL)
|
||||
static const int nanosec_per_usec = 1000;
|
||||
rtl_delay(usec * nanosec_per_usec);
|
||||
#else
|
||||
udelay(usec);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -523,8 +523,6 @@ struct usb_device; /* forward declaration */
|
||||
int comedi_usb_auto_config(struct usb_device *usbdev, const char *board_name);
|
||||
void comedi_usb_auto_unconfig(struct usb_device *usbdev);
|
||||
|
||||
#include "comedi_rt.h"
|
||||
|
||||
#ifdef CONFIG_COMEDI_PCI_DRIVERS
|
||||
#define CONFIG_COMEDI_PCI
|
||||
#endif
|
||||
|
||||
@@ -31,6 +31,7 @@ Status: experimental
|
||||
|
||||
*/
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include "../comedidev.h"
|
||||
#include <linux/delay.h>
|
||||
#include <linux/pci.h>
|
||||
|
||||
@@ -43,6 +43,7 @@ See http://www.measurementcomputing.com/PDFManuals/pcim-das1602_16.pdf for more
|
||||
#include "../comedidev.h"
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include "comedi_pci.h"
|
||||
#include "plx9052.h"
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -119,6 +119,7 @@ Configuration options:
|
||||
#include "../comedidev.h"
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include <linux/interrupt.h>
|
||||
|
||||
#include "comedi_pci.h"
|
||||
#include "8255.h"
|
||||
|
||||
@@ -79,6 +79,7 @@ Computer boards manuals also available from their website www.measurementcomputi
|
||||
*/
|
||||
|
||||
#include <linux/pci.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <asm/dma.h>
|
||||
#include "../comedidev.h"
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@ irq can be omitted, although the cmd interface will not work without it.
|
||||
*/
|
||||
|
||||
#include <linux/ioport.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include "../comedidev.h"
|
||||
|
||||
#include "8255.h"
|
||||
|
||||
@@ -100,6 +100,7 @@ TODO:
|
||||
read insn for analog out
|
||||
*/
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include "../comedidev.h"
|
||||
|
||||
#include <linux/ioport.h>
|
||||
|
||||
@@ -38,6 +38,7 @@ Devices: [Keithley Metrabyte] DAS6402 (das6402)
|
||||
This driver has suffered bitrot.
|
||||
*/
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include "../comedidev.h"
|
||||
|
||||
#include <linux/ioport.h>
|
||||
|
||||
@@ -62,6 +62,7 @@ cmd triggers supported:
|
||||
|
||||
*/
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include "../comedidev.h"
|
||||
|
||||
#include <linux/ioport.h>
|
||||
|
||||
@@ -74,6 +74,7 @@ Configuration Options:
|
||||
* options that are used with comedi_config.
|
||||
*/
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include "../comedidev.h"
|
||||
#include <linux/ioport.h>
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ Configuration options:
|
||||
[4] - D/A 1 range (same choices)
|
||||
*/
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include "../comedidev.h"
|
||||
|
||||
#include <linux/ioport.h>
|
||||
|
||||
@@ -39,6 +39,7 @@ a power of 10, from 1 to 10^7, of which only 3 or 4 are useful. In
|
||||
addition, the clock does not seem to be very accurate.
|
||||
*/
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include "../comedidev.h"
|
||||
|
||||
#include <linux/ioport.h>
|
||||
|
||||
@@ -59,6 +59,7 @@ AO commands are not supported.
|
||||
|
||||
#define DEBUG 1
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include "../comedidev.h"
|
||||
#include <linux/delay.h>
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ support could be added to this driver.
|
||||
|
||||
*/
|
||||
|
||||
#include <linux/interrupt.h>
|
||||
#include "../comedidev.h"
|
||||
#include <linux/delay.h>
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user