static int comedi_ioctl(struct inode * inode,struct file * file,
unsigned int cmd,unsigned long arg)
{
- unsigned int minor=minor(inode->i_rdev);
+ unsigned int minor=MINOR(inode->i_rdev);
comedi_device *dev=comedi_get_device_by_minor(minor);
/* Device config is special, because it must work on
static int comedi_mmap_v22(struct file * file, struct vm_area_struct *vma)
{
- unsigned int minor=minor(RDEV_OF_FILE(file));
+ unsigned int minor=MINOR(RDEV_OF_FILE(file));
comedi_device *dev=comedi_get_device_by_minor(minor);
comedi_async *async = NULL;
unsigned long start = vma->vm_start;
comedi_async *async;
unsigned int mask;
- dev=comedi_get_device_by_minor(minor(RDEV_OF_FILE(file)));
+ dev=comedi_get_device_by_minor(MINOR(RDEV_OF_FILE(file)));
if(!dev->attached)
{
int n,m,count=0,retval=0;
DECLARE_WAITQUEUE(wait,current);
- dev=comedi_get_device_by_minor(minor(RDEV_OF_FILE(file)));
+ dev=comedi_get_device_by_minor(MINOR(RDEV_OF_FILE(file)));
if(!dev->attached)
{
int n,m,count=0,retval=0;
DECLARE_WAITQUEUE(wait,current);
- dev=comedi_get_device_by_minor(minor(RDEV_OF_FILE(file)));
+ dev=comedi_get_device_by_minor(MINOR(RDEV_OF_FILE(file)));
if(!dev->attached)
{
comedi_device *dev;
loff_t new_offset;
- dev=comedi_get_device_by_minor(minor(RDEV_OF_FILE(file)));
+ dev=comedi_get_device_by_minor(MINOR(RDEV_OF_FILE(file)));
switch(origin){
case SEEK_SET:
static int comedi_fop_open(struct inode *inode,struct file *file)
{
- unsigned int minor=minor(inode->i_rdev);
+ unsigned int minor=MINOR(inode->i_rdev);
comedi_device *dev;
char mod[32];
static int comedi_close_v22(struct inode *inode,struct file *file)
{
- comedi_device *dev=comedi_get_device_by_minor(minor(inode->i_rdev));
+ comedi_device *dev=comedi_get_device_by_minor(MINOR(inode->i_rdev));
comedi_subdevice *s = NULL;
int i;
#if LINUX_VERSION_CODE >= 0x020100
static int comedi_fasync (int fd, struct file *file, int on)
{
- comedi_device *dev=comedi_get_device_by_minor(minor(RDEV_OF_FILE(file)));
+ comedi_device *dev=comedi_get_device_by_minor(MINOR(RDEV_OF_FILE(file)));
return fasync_helper(fd,file,on,&dev->async_queue);
}