new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -181,7 +181,7 @@ static int dsp56k_upload(u_char __user *bin, int len)
|
||||
static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(file);
|
||||
int dev = iminor(inode) & 0x0f;
|
||||
|
||||
switch(dev)
|
||||
@@ -244,7 +244,7 @@ static ssize_t dsp56k_read(struct file *file, char __user *buf, size_t count,
|
||||
static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t count,
|
||||
loff_t *ppos)
|
||||
{
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(file);
|
||||
int dev = iminor(inode) & 0x0f;
|
||||
|
||||
switch(dev)
|
||||
@@ -306,7 +306,7 @@ static ssize_t dsp56k_write(struct file *file, const char __user *buf, size_t co
|
||||
static long dsp56k_ioctl(struct file *file, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
int dev = iminor(file->f_path.dentry->d_inode) & 0x0f;
|
||||
int dev = iminor(file_inode(file)) & 0x0f;
|
||||
void __user *argp = (void __user *)arg;
|
||||
|
||||
switch(dev)
|
||||
@@ -408,7 +408,7 @@ static long dsp56k_ioctl(struct file *file, unsigned int cmd,
|
||||
#if 0
|
||||
static unsigned int dsp56k_poll(struct file *file, poll_table *wait)
|
||||
{
|
||||
int dev = iminor(file->f_path.dentry->d_inode) & 0x0f;
|
||||
int dev = iminor(file_inode(file)) & 0x0f;
|
||||
|
||||
switch(dev)
|
||||
{
|
||||
|
Reference in New Issue
Block a user