From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from caramon.arm.linux.org.uk ([78.32.30.218]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QM4qn-0001ov-7p for linux-mtd@lists.infradead.org; Mon, 16 May 2011 20:57:14 +0000 Date: Mon, 16 May 2011 21:56:44 +0100 From: Russell King - ARM Linux To: Eric Miao Subject: Re: [PATCH v5 8/8] MTD: physmap: let set_vpp() pass a platform_device instead of a map_info Message-ID: <20110516205644.GG13659@n2100.arm.linux.org.uk> References: <1305557977-16871-1-git-send-email-marc.zyngier@arm.com> <1305557977-16871-9-git-send-email-marc.zyngier@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King - ARM Linux Cc: Ben Dooks , Marc Zyngier , David Woodhouse , Nicolas Ferre , linux-mtd@lists.infradead.org, Philipp Zabel , Jean-Christophe Plagniol-Villard , Andrew Victor , linux-arm-kernel@lists.infradead.org List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Mon, May 16, 2011 at 11:06:10PM +0800, Eric Miao wrote: > On Mon, May 16, 2011 at 10:59 PM, Marc Zyngier wrote: > > The set_vpp() method provided by physmap passes a map_info back to > > the platform code, which has little relevance as far as the platform > > is concerned (this parameter is completely unused). > > > > Instead, pass the platform_device, which can be used in the pismo > > driver to retrieve some important information in a nicer way, instead > > of the hack that was in place. > > Not really sure if a 'struct device' would be more generic here, though this > case is simply a 'struct platform_device'. As it's a platform device driver (at the moment), passing the platform device seems logical. If it becomes an DT based device driver, then we need some other way of describing the set_vpp etc functionality as we can't describe function pointers in DT (the same problem goes for a lot of platform device drivers.)