Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934625AbbKSTHP (ORCPT ); Thu, 19 Nov 2015 14:07:15 -0500 Received: from mail-pa0-f44.google.com ([209.85.220.44]:36024 "EHLO mail-pa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933712AbbKSTHL (ORCPT ); Thu, 19 Nov 2015 14:07:11 -0500 Date: Thu, 19 Nov 2015 11:07:07 -0800 From: Brian Norris To: Boris Brezillon Cc: David Woodhouse , linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jonathan Corbet , linux-doc@vger.kernel.org, Hartley Sweeten , Ryan Mallon , Shawn Guo , Sascha Hauer , Imre Kaloz , Krzysztof Halasa , Tony Lindgren , linux-omap@vger.kernel.org, Alexander Clouter , Thomas Petazzoni , Gregory CLEMENT , Jason Cooper , Sebastian Hesselbarth , Andrew Lunn , Daniel Mack , Haojian Zhuang , Robert Jarzmik , Marek Vasut , Steven Miao , adi-buildroot-devel@lists.sourceforge.net, Mikael Starvik , Jesper Nilsson , linux-cris-kernel@axis.com, Josh Wu , Wan ZongShun , Ezequiel Garcia , Maxim Levitsky , Kukjin Kim , Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Maxime Ripard , Chen-Yu Tsai , linux-sunxi@googlegroups.com, Stefan Agner , Greg Kroah-Hartman , devel@driverdev.osuosl.org Subject: Re: [PATCH 01/27] mtd: nand: fix drivers abusing mtd->priv Message-ID: <20151119190707.GE64635@google.com> References: <1447681080-31232-1-git-send-email-boris.brezillon@free-electrons.com> <1447681080-31232-2-git-send-email-boris.brezillon@free-electrons.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1447681080-31232-2-git-send-email-boris.brezillon@free-electrons.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 842 Lines: 17 On Mon, Nov 16, 2015 at 02:37:34PM +0100, Boris Brezillon wrote: > The ->priv field of the mtd_info object attached to a nand_chip device > should point to the nand_chip device. The pxa and cafe drivers are > assigning this field their own private structure, which works fine as long > as the nand_chip field is the first one in the driver private struct but > seems a bit fragile. > Fix that by setting mtd->priv to point the nand_chip field and assigning > chip->priv to the private structure head. > > Signed-off-by: Boris Brezillon Applied to l2-mtd.git -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/