From mboxrd@z Thu Jan 1 00:00:00 1970 From: Imre Deak Subject: Re: TSC2101/2102 Date: Tue, 3 Apr 2007 17:36:16 +0300 Message-ID: <20070403143616.GA12681@bitbox> References: <20070320153812.GI19913@atomide.com> <20070322084830.1a91c99c.jarkko.nikula@nokia.com> <20070330184933.GB18375@atomide.com> <20070331170100.GA2565@bitbox> <20070402202325.GA23808@bitbox> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-omap-open-source-bounces@linux.omap.com Errors-To: linux-omap-open-source-bounces@linux.omap.com To: Eduardo Valentin Cc: Kyungmin Park , Linux OMAP ML List-Id: linux-omap@vger.kernel.org Hi, On Tue, Apr 03, 2007 at 07:22:57AM -0400, Eduardo Valentin wrote: > Hello again Imre, > > > I didn't understand properly your question. My bad. Sorry. > I used set_drvdata because it is used into lcd_h2.c (accordingly to > my previous patch): > @@ -117,6 +97,19 @@ struct lcd_panel h2_panel = { > > static int h2_panel_probe(struct platform_device *pdev) > { > + struct spi_device *tsc2101; > + > + tsc2101 = dev_get_drvdata(&pdev->dev); > + if (tsc2101 == NULL) { > + dev_err(&pdev->dev, "no platform data\n"); > + return -ENODEV; > + } > > Of course, it is clear enough that this dev_err message is wrong. > It must be "no driver data". My bad again. However, why do you suggest > use platform_data instead of driver_data? That's the standard way platforms pass init data to the driver. The driver can then use the driver_data field for it's own purpose. But more important would be to know why platform_data gets zero'd, since the device core is not touching it. A workaround you're proposing might just delay some other problem.. --Imre