Proper way to get device file minor number from struct file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I am looking through some legacy out of tree custom linux kernel device
driver.

It is full of lines like the following:

iminor(fp->f_dentry->d_inode)

here struct file *fp is an argument of callback of struct file_operations.

Documentation/filesystems/porting says:

"f_dentry is gone; use f_path.dentry, or, better yet, see if you can
avoid it entirely"

So, is there a proper compatible way to do the same?


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux