mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -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
|
|
@ -69,7 +69,7 @@ static int fb_deferred_io_fault(struct vm_area_struct *vma,
|
|||
int fb_deferred_io_fsync(struct file *file, loff_t start, loff_t end, int datasync)
|
||||
{
|
||||
struct fb_info *info = file->private_data;
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(file);
|
||||
int err = filemap_write_and_wait_range(inode->i_mapping, start, end);
|
||||
if (err)
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -727,7 +727,7 @@ static const struct file_operations fb_proc_fops = {
|
|||
*/
|
||||
static struct fb_info *file_fb_info(struct file *file)
|
||||
{
|
||||
struct inode *inode = file->f_path.dentry->d_inode;
|
||||
struct inode *inode = file_inode(file);
|
||||
int fbidx = iminor(inode);
|
||||
struct fb_info *info = registered_fb[fbidx];
|
||||
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ int get_img(struct mdp_img *img, struct fb_info *info,
|
|||
if (f.file == NULL)
|
||||
return -1;
|
||||
|
||||
if (MAJOR(f.file->f_dentry->d_inode->i_rdev) == FB_MAJOR) {
|
||||
if (MAJOR(file_inode(f.file)->i_rdev) == FB_MAJOR) {
|
||||
*start = info->fix.smem_start;
|
||||
*len = info->fix.smem_len;
|
||||
} else
|
||||
|
|
|
|||
Loading…
Reference in a new issue