Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 141500
b: refs/heads/master
c: 71b5f4f
h: refs/heads/master
v: v3
  • Loading branch information
Bill Pemberton authored and Greg Kroah-Hartman committed Apr 3, 2009
1 parent 2879310 commit 9a78332
Show file tree
Hide file tree
Showing 169 changed files with 3,189 additions and 3,190 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: 790c55415aa31f4c732729f94d2c3a54f7d3bfc2
refs/heads/master: 71b5f4f11971dea972832ad63a994c7e5b45db6b
108 changes: 54 additions & 54 deletions trunk/drivers/staging/comedi/comedi_fops.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,29 +69,29 @@ static DEFINE_SPINLOCK(comedi_file_info_table_lock);
static struct comedi_device_file_info
*comedi_file_info_table[COMEDI_NUM_MINORS];

static int do_devconfig_ioctl(comedi_device *dev, comedi_devconfig *arg);
static int do_bufconfig_ioctl(comedi_device *dev, void *arg);
static int do_devinfo_ioctl(comedi_device *dev, comedi_devinfo *arg,
static int do_devconfig_ioctl(struct comedi_device *dev, comedi_devconfig *arg);
static int do_bufconfig_ioctl(struct comedi_device *dev, void *arg);
static int do_devinfo_ioctl(struct comedi_device *dev, comedi_devinfo *arg,
struct file *file);
static int do_subdinfo_ioctl(comedi_device *dev, comedi_subdinfo *arg,
static int do_subdinfo_ioctl(struct comedi_device *dev, comedi_subdinfo *arg,
void *file);
static int do_chaninfo_ioctl(comedi_device *dev, comedi_chaninfo *arg);
static int do_bufinfo_ioctl(comedi_device *dev, void *arg);
static int do_cmd_ioctl(comedi_device *dev, void *arg, void *file);
static int do_lock_ioctl(comedi_device *dev, unsigned int arg, void *file);
static int do_unlock_ioctl(comedi_device *dev, unsigned int arg, void *file);
static int do_cancel_ioctl(comedi_device *dev, unsigned int arg, void *file);
static int do_cmdtest_ioctl(comedi_device *dev, void *arg, void *file);
static int do_insnlist_ioctl(comedi_device *dev, void *arg, void *file);
static int do_insn_ioctl(comedi_device *dev, void *arg, void *file);
static int do_poll_ioctl(comedi_device *dev, unsigned int subd, void *file);

extern void do_become_nonbusy(comedi_device *dev, comedi_subdevice *s);
static int do_cancel(comedi_device *dev, comedi_subdevice *s);
static int do_chaninfo_ioctl(struct comedi_device *dev, comedi_chaninfo *arg);
static int do_bufinfo_ioctl(struct comedi_device *dev, void *arg);
static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file);
static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg, void *file);
static int do_unlock_ioctl(struct comedi_device *dev, unsigned int arg, void *file);
static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg, void *file);
static int do_cmdtest_ioctl(struct comedi_device *dev, void *arg, void *file);
static int do_insnlist_ioctl(struct comedi_device *dev, void *arg, void *file);
static int do_insn_ioctl(struct comedi_device *dev, void *arg, void *file);
static int do_poll_ioctl(struct comedi_device *dev, unsigned int subd, void *file);

extern void do_become_nonbusy(struct comedi_device *dev, comedi_subdevice *s);
static int do_cancel(struct comedi_device *dev, comedi_subdevice *s);

static int comedi_fasync(int fd, struct file *file, int on);

static int is_device_busy(comedi_device *dev);
static int is_device_busy(struct comedi_device *dev);

#ifdef HAVE_UNLOCKED_IOCTL
static long comedi_unlocked_ioctl(struct file *file, unsigned int cmd,
Expand All @@ -104,7 +104,7 @@ static int comedi_ioctl(struct inode *inode, struct file *file,
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
comedi_device *dev;
struct comedi_device *dev;
int rc;

if (dev_file_info == NULL || dev_file_info->device == NULL)
Expand Down Expand Up @@ -192,7 +192,7 @@ static int comedi_ioctl(struct inode *inode, struct file *file,
writes:
none
*/
static int do_devconfig_ioctl(comedi_device *dev, comedi_devconfig *arg)
static int do_devconfig_ioctl(struct comedi_device *dev, comedi_devconfig *arg)
{
comedi_devconfig it;
int ret;
Expand Down Expand Up @@ -272,7 +272,7 @@ static int do_devconfig_ioctl(comedi_device *dev, comedi_devconfig *arg)
modified bufconfig at arg
*/
static int do_bufconfig_ioctl(comedi_device *dev, void *arg)
static int do_bufconfig_ioctl(struct comedi_device *dev, void *arg)
{
comedi_bufconfig bc;
comedi_async *async;
Expand Down Expand Up @@ -360,7 +360,7 @@ static int do_bufconfig_ioctl(comedi_device *dev, void *arg)
devinfo structure
*/
static int do_devinfo_ioctl(comedi_device *dev, comedi_devinfo *arg,
static int do_devinfo_ioctl(struct comedi_device *dev, comedi_devinfo *arg,
struct file *file)
{
comedi_devinfo devinfo;
Expand Down Expand Up @@ -410,7 +410,7 @@ static int do_devinfo_ioctl(comedi_device *dev, comedi_devinfo *arg,
array of subdevice info structures at arg
*/
static int do_subdinfo_ioctl(comedi_device *dev, comedi_subdinfo *arg,
static int do_subdinfo_ioctl(struct comedi_device *dev, comedi_subdinfo *arg,
void *file)
{
int ret, i;
Expand Down Expand Up @@ -490,7 +490,7 @@ static int do_subdinfo_ioctl(comedi_device *dev, comedi_subdinfo *arg,
arrays at elements of chaninfo structure
*/
static int do_chaninfo_ioctl(comedi_device *dev, comedi_chaninfo *arg)
static int do_chaninfo_ioctl(struct comedi_device *dev, comedi_chaninfo *arg)
{
comedi_subdevice *s;
comedi_chaninfo it;
Expand Down Expand Up @@ -554,7 +554,7 @@ static int do_chaninfo_ioctl(comedi_device *dev, comedi_chaninfo *arg)
modified bufinfo at arg
*/
static int do_bufinfo_ioctl(comedi_device *dev, void *arg)
static int do_bufinfo_ioctl(struct comedi_device *dev, void *arg)
{
comedi_bufinfo bi;
comedi_subdevice *s;
Expand Down Expand Up @@ -607,7 +607,7 @@ static int do_bufinfo_ioctl(comedi_device *dev, void *arg)
return 0;
}

static int parse_insn(comedi_device *dev, comedi_insn *insn, unsigned int *data,
static int parse_insn(struct comedi_device *dev, comedi_insn *insn, unsigned int *data,
void *file);
/*
* COMEDI_INSNLIST
Expand All @@ -626,7 +626,7 @@ static int parse_insn(comedi_device *dev, comedi_insn *insn, unsigned int *data,
*/
/* arbitrary limits */
#define MAX_SAMPLES 256
static int do_insnlist_ioctl(comedi_device *dev, void *arg, void *file)
static int do_insnlist_ioctl(struct comedi_device *dev, void *arg, void *file)
{
comedi_insnlist insnlist;
comedi_insn *insns = NULL;
Expand Down Expand Up @@ -757,7 +757,7 @@ static int check_insn_config_length(comedi_insn *insn, unsigned int *data)
return -EINVAL;
}

static int parse_insn(comedi_device *dev, comedi_insn *insn, unsigned int *data,
static int parse_insn(struct comedi_device *dev, comedi_insn *insn, unsigned int *data,
void *file)
{
comedi_subdevice *s;
Expand Down Expand Up @@ -917,7 +917,7 @@ static int parse_insn(comedi_device *dev, comedi_insn *insn, unsigned int *data,
* writes:
* data (for reads)
*/
static int do_insn_ioctl(comedi_device *dev, void *arg, void *file)
static int do_insn_ioctl(struct comedi_device *dev, void *arg, void *file)
{
comedi_insn insn;
unsigned int *data = NULL;
Expand Down Expand Up @@ -975,7 +975,7 @@ static int do_insn_ioctl(comedi_device *dev, void *arg, void *file)
modified cmd structure at arg
*/
static int do_cmd_ioctl(comedi_device *dev, void *arg, void *file)
static int do_cmd_ioctl(struct comedi_device *dev, void *arg, void *file)
{
comedi_cmd user_cmd;
comedi_subdevice *s;
Expand Down Expand Up @@ -1129,7 +1129,7 @@ static int do_cmd_ioctl(comedi_device *dev, void *arg, void *file)
modified cmd structure at arg
*/
static int do_cmdtest_ioctl(comedi_device *dev, void *arg, void *file)
static int do_cmdtest_ioctl(struct comedi_device *dev, void *arg, void *file)
{
comedi_cmd user_cmd;
comedi_subdevice *s;
Expand Down Expand Up @@ -1227,7 +1227,7 @@ static int do_cmdtest_ioctl(comedi_device *dev, void *arg, void *file)
*/

static int do_lock_ioctl(comedi_device *dev, unsigned int arg, void *file)
static int do_lock_ioctl(struct comedi_device *dev, unsigned int arg, void *file)
{
int ret = 0;
unsigned long flags;
Expand Down Expand Up @@ -1271,7 +1271,7 @@ static int do_lock_ioctl(comedi_device *dev, unsigned int arg, void *file)
This function isn't protected by the semaphore, since
we already own the lock.
*/
static int do_unlock_ioctl(comedi_device *dev, unsigned int arg, void *file)
static int do_unlock_ioctl(struct comedi_device *dev, unsigned int arg, void *file)
{
comedi_subdevice *s;

Expand Down Expand Up @@ -1311,7 +1311,7 @@ static int do_unlock_ioctl(comedi_device *dev, unsigned int arg, void *file)
nothing
*/
static int do_cancel_ioctl(comedi_device *dev, unsigned int arg, void *file)
static int do_cancel_ioctl(struct comedi_device *dev, unsigned int arg, void *file)
{
comedi_subdevice *s;

Expand Down Expand Up @@ -1347,7 +1347,7 @@ static int do_cancel_ioctl(comedi_device *dev, unsigned int arg, void *file)
nothing
*/
static int do_poll_ioctl(comedi_device *dev, unsigned int arg, void *file)
static int do_poll_ioctl(struct comedi_device *dev, unsigned int arg, void *file)
{
comedi_subdevice *s;

Expand All @@ -1370,7 +1370,7 @@ static int do_poll_ioctl(comedi_device *dev, unsigned int arg, void *file)
return -EINVAL;
}

static int do_cancel(comedi_device *dev, comedi_subdevice *s)
static int do_cancel(struct comedi_device *dev, comedi_subdevice *s)
{
int ret = 0;

Expand All @@ -1385,7 +1385,7 @@ static int do_cancel(comedi_device *dev, comedi_subdevice *s)
void comedi_unmap(struct vm_area_struct *area)
{
comedi_async *async;
comedi_device *dev;
struct comedi_device *dev;

async = area->vm_private_data;
dev = async->subdevice->device;
Expand All @@ -1404,7 +1404,7 @@ static int comedi_mmap(struct file *file, struct vm_area_struct *vma)
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
comedi_device *dev = dev_file_info->device;
struct comedi_device *dev = dev_file_info->device;
comedi_async *async = NULL;
unsigned long start = vma->vm_start;
unsigned long size;
Expand Down Expand Up @@ -1480,7 +1480,7 @@ static unsigned int comedi_poll(struct file *file, poll_table *wait)
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
comedi_device *dev = dev_file_info->device;
struct comedi_device *dev = dev_file_info->device;
comedi_subdevice *read_subdev;
comedi_subdevice *write_subdev;

Expand Down Expand Up @@ -1530,7 +1530,7 @@ static ssize_t comedi_write(struct file *file, const char *buf, size_t nbytes,
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
comedi_device *dev = dev_file_info->device;
struct comedi_device *dev = dev_file_info->device;

if (!dev->attached) {
DPRINTK("no driver configured on comedi%i\n", dev->minor);
Expand Down Expand Up @@ -1632,7 +1632,7 @@ static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes,
const unsigned minor = iminor(file->f_dentry->d_inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
comedi_device *dev = dev_file_info->device;
struct comedi_device *dev = dev_file_info->device;

if (!dev->attached) {
DPRINTK("no driver configured on comedi%i\n", dev->minor);
Expand Down Expand Up @@ -1733,7 +1733,7 @@ static ssize_t comedi_read(struct file *file, char *buf, size_t nbytes,
/*
This function restores a subdevice to an idle state.
*/
void do_become_nonbusy(comedi_device *dev, comedi_subdevice *s)
void do_become_nonbusy(struct comedi_device *dev, comedi_subdevice *s)
{
comedi_async *async = s->async;

Expand All @@ -1760,7 +1760,7 @@ static int comedi_open(struct inode *inode, struct file *file)
const unsigned minor = iminor(inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
comedi_device *dev = dev_file_info ? dev_file_info->device : NULL;
struct comedi_device *dev = dev_file_info ? dev_file_info->device : NULL;

if (dev == NULL) {
DPRINTK("invalid minor number\n");
Expand Down Expand Up @@ -1832,7 +1832,7 @@ static int comedi_close(struct inode *inode, struct file *file)
const unsigned minor = iminor(inode);
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);
comedi_device *dev = dev_file_info->device;
struct comedi_device *dev = dev_file_info->device;
comedi_subdevice *s = NULL;
int i;

Expand Down Expand Up @@ -1871,7 +1871,7 @@ static int comedi_fasync(int fd, struct file *file, int on)
struct comedi_device_file_info *dev_file_info =
comedi_get_device_file_info(minor);

comedi_device *dev = dev_file_info->device;
struct comedi_device *dev = dev_file_info->device;

return fasync_helper(fd, file, on, &dev->async_queue);
}
Expand Down Expand Up @@ -2000,13 +2000,13 @@ static void __exit comedi_cleanup(void)
module_init(comedi_init);
module_exit(comedi_cleanup);

void comedi_error(const comedi_device *dev, const char *s)
void comedi_error(const struct comedi_device *dev, const char *s)
{
rt_printk("comedi%d: %s: %s\n", dev->minor, dev->driver->driver_name,
s);
}

void comedi_event(comedi_device *dev, comedi_subdevice *s)
void comedi_event(struct comedi_device *dev, comedi_subdevice *s)
{
comedi_async *async = s->async;
unsigned runflags = 0;
Expand Down Expand Up @@ -2089,7 +2089,7 @@ unsigned comedi_get_subdevice_runflags(comedi_subdevice *s)
return runflags;
}

static int is_device_busy(comedi_device *dev)
static int is_device_busy(struct comedi_device *dev)
{
comedi_subdevice *s;
int i;
Expand All @@ -2108,15 +2108,15 @@ static int is_device_busy(comedi_device *dev)
return 0;
}

void comedi_device_init(comedi_device *dev)
void comedi_device_init(struct comedi_device *dev)
{
memset(dev, 0, sizeof(comedi_device));
memset(dev, 0, sizeof(struct comedi_device));
spin_lock_init(&dev->spinlock);
mutex_init(&dev->mutex);
dev->minor = -1;
}

void comedi_device_cleanup(comedi_device *dev)
void comedi_device_cleanup(struct comedi_device *dev)
{
if (dev == NULL)
return;
Expand All @@ -2136,7 +2136,7 @@ int comedi_alloc_board_minor(struct device *hardware_device)
info = kzalloc(sizeof(struct comedi_device_file_info), GFP_KERNEL);
if (info == NULL)
return -ENOMEM;
info->device = kzalloc(sizeof(comedi_device), GFP_KERNEL);
info->device = kzalloc(sizeof(struct comedi_device), GFP_KERNEL);
if (info->device == NULL) {
kfree(info);
return -ENOMEM;
Expand Down Expand Up @@ -2180,7 +2180,7 @@ void comedi_free_board_minor(unsigned minor)
comedi_spin_unlock_irqrestore(&comedi_file_info_table_lock, flags);

if (info) {
comedi_device *dev = info->device;
struct comedi_device *dev = info->device;
if (dev) {
if (dev->class_dev) {
device_destroy(comedi_class,
Expand All @@ -2193,7 +2193,7 @@ void comedi_free_board_minor(unsigned minor)
}
}

int comedi_alloc_subdevice_minor(comedi_device *dev, comedi_subdevice *s)
int comedi_alloc_subdevice_minor(struct comedi_device *dev, comedi_subdevice *s)
{
unsigned long flags;
struct comedi_device_file_info *info;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/comedi/comedi_rt.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@

int comedi_request_irq(unsigned int irq, irqreturn_t(*handler) (int,
void *PT_REGS_ARG), unsigned long flags, const char *device,
comedi_device *dev_id);
void comedi_free_irq(unsigned int irq, comedi_device *dev_id);
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(comedi_device *dev);
void comedi_switch_to_non_rt(comedi_device *dev);
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);
Expand Down
Loading

0 comments on commit 9a78332

Please sign in to comment.