All of lore.kernel.org
 help / color / mirror / Atom feed
From: matwey.kornilov@gmail.com (Matwey V. Kornilov)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Proper way to get device file minor number from struct file
Date: Sun, 10 Jul 2016 18:22:25 +0300	[thread overview]
Message-ID: <nltp7i$5oi$1@ger.gmane.org> (raw)

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?

             reply	other threads:[~2016-07-10 15:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-10 15:22 Matwey V. Kornilov [this message]
2016-07-10 16:02 ` Proper way to get device file minor number from struct file Bjørn Mork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='nltp7i$5oi$1@ger.gmane.org' \
    --to=matwey.kornilov@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.