static int file_open(struct inode *inode, struct file *filp)
{
- int minor = MINOR(inode->i_rdev);
+ int minor = iminor(inode);
return rtlx_open(minor, (filp->f_flags & O_NONBLOCK) ? 0 : 1);
}
static int file_release(struct inode *inode, struct file *filp)
{
- int minor;
- minor = MINOR(inode->i_rdev);
+ int minor = iminor(inode);
return rtlx_release(minor);
}
int minor;
unsigned int mask = 0;
- minor = MINOR(file->f_dentry->d_inode->i_rdev);
+ minor = iminor(file->f_dentry->d_inode);
poll_wait(file, &channel_wqs[minor].rt_queue, wait);
poll_wait(file, &channel_wqs[minor].lx_queue, wait);
static ssize_t file_read(struct file *file, char __user * buffer, size_t count,
loff_t * ppos)
{
- int minor = MINOR(file->f_dentry->d_inode->i_rdev);
+ int minor = iminor(file->f_dentry->d_inode);
/* data available? */
if (!rtlx_read_poll(minor, (file->f_flags & O_NONBLOCK) ? 0 : 1)) {
struct rtlx_channel *rt;
DECLARE_WAITQUEUE(wait, current);
- minor = MINOR(file->f_dentry->d_inode->i_rdev);
+ minor = iminor(file->f_dentry->d_inode);
rt = &rtlx->channel[minor];
/* any space left... */
struct vpe_notifications *not;
/* assume only 1 device at the mo. */
- if ((minor = MINOR(inode->i_rdev)) != 1) {
+ if ((minor = iminor(inode)) != 1) {
printk(KERN_WARNING "VPE loader: only vpe1 is supported\n");
return -ENODEV;
}
struct vpe *v;
Elf_Ehdr *hdr;
- minor = MINOR(inode->i_rdev);
+ minor = iminor(inode);
if ((v = get_vpe(minor)) == NULL)
return -ENODEV;
size_t ret = count;
struct vpe *v;
- minor = MINOR(file->f_dentry->d_inode->i_rdev);
+ minor = iminor(file->f_dentry->d_inode);
if ((v = get_vpe(minor)) == NULL)
return -ENODEV;