mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
new helper: file_inode(file)
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
57eccb830f
commit
496ad9aa8e
306 changed files with 696 additions and 717 deletions
|
|
@ -101,7 +101,7 @@ vcs_poll_data_get(struct file *file)
|
|||
poll = kzalloc(sizeof(*poll), GFP_KERNEL);
|
||||
if (!poll)
|
||||
return NULL;
|
||||
poll->cons_num = iminor(file->f_path.dentry->d_inode) & 127;
|
||||
poll->cons_num = iminor(file_inode(file)) & 127;
|
||||
init_waitqueue_head(&poll->waitq);
|
||||
poll->notifier.notifier_call = vcs_notifier;
|
||||
if (register_vt_notifier(&poll->notifier) != 0) {
|
||||
|
|
@ -182,7 +182,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
|
|||
int size;
|
||||
|
||||
console_lock();
|
||||
size = vcs_size(file->f_path.dentry->d_inode);
|
||||
size = vcs_size(file_inode(file));
|
||||
console_unlock();
|
||||
if (size < 0)
|
||||
return size;
|
||||
|
|
@ -208,7 +208,7 @@ static loff_t vcs_lseek(struct file *file, loff_t offset, int orig)
|
|||
static ssize_t
|
||||
vcs_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);
|
||||
unsigned int currcons = iminor(inode);
|
||||
struct vc_data *vc;
|
||||
struct vcs_poll_data *poll;
|
||||
|
|
@ -386,7 +386,7 @@ unlock_out:
|
|||
static ssize_t
|
||||
vcs_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);
|
||||
unsigned int currcons = iminor(inode);
|
||||
struct vc_data *vc;
|
||||
long pos;
|
||||
|
|
|
|||
Loading…
Reference in a new issue