From: Arnd Bergmann <arnd@arndb.de>
To: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: "Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
linux-kernel@vger.kernel.org,
Samu Onkalo <samu.p.onkalo@nokia.com>,
michael.opdenacker@free-electrons.com,
gregory.clement@free-electrons.com,
maxime.ripard@free-electrons.com,
alexandre.belloni@free-electrons.com
Subject: Re: [PATCH] char: misc: assign file->private_data in all cases
Date: Fri, 21 Jun 2013 15:25:06 +0200 [thread overview]
Message-ID: <201306211525.06761.arnd@arndb.de> (raw)
In-Reply-To: <1371819665-3882-1-git-send-email-thomas.petazzoni@free-electrons.com>
On Friday 21 June 2013, Thomas Petazzoni wrote:
> n fa1f68db6ca ("drivers: misc: pass miscdevice pointer via file
> private data"), the misc driver infrastructure was changed to assigned
> file->private_data as a pointer to the 'struct miscdevice' that
> corresponds to the device being opened.
>
> However, this assignment was only done when the misc driver was
> declaring a driver-specific ->open() operation in its
> file_operations. This doesn't make sense, as the driver may not
> necessarily have a custom ->open() operation, and might still be
> interested in having file->private_data properly set for use in its
> ->read() and write() operations.
>
> Therefore, we move the assignment of file->private_data outside of the
> condition that tests whether a driver-specific ->open() operation was
> defined.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
next prev parent reply other threads:[~2013-06-21 13:25 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-21 13:01 [PATCH] char: misc: assign file->private_data in all cases Thomas Petazzoni
2013-06-21 13:25 ` Arnd Bergmann [this message]
2013-06-24 22:26 ` Greg Kroah-Hartman
2013-06-25 9:59 ` Thomas Petazzoni
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=201306211525.06761.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=alexandre.belloni@free-electrons.com \
--cc=gregkh@linuxfoundation.org \
--cc=gregory.clement@free-electrons.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maxime.ripard@free-electrons.com \
--cc=michael.opdenacker@free-electrons.com \
--cc=samu.p.onkalo@nokia.com \
--cc=thomas.petazzoni@free-electrons.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox