[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <201306211525.06761.arnd@arndb.de>
Date: Fri, 21 Jun 2013 15:25:06 +0200
From: Arnd Bergmann <arnd@...db.de>
To: Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>
Cc: "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org,
Samu Onkalo <samu.p.onkalo@...ia.com>,
michael.opdenacker@...e-electrons.com,
gregory.clement@...e-electrons.com,
maxime.ripard@...e-electrons.com,
alexandre.belloni@...e-electrons.com
Subject: Re: [PATCH] char: misc: assign file->private_data in all cases
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@...e-electrons.com>
Acked-by: Arnd Bergmann <arnd@...db.de>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists