[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130724170215.GP9858@sirena.org.uk>
Date: Wed, 24 Jul 2013 18:02:15 +0100
From: Mark Brown <broonie@...nel.org>
To: Rhyland Klein <rklein@...dia.com>
Cc: Liam Girdwood <lgirdwood@...il.com>,
Joseph Lo <josephl@...dia.com>, linux-kernel@...r.kernel.org,
linux-tegra@...r.kernel.org
Subject: Re: [PATCH] regulator: palmas: fix pdata ptr not be updated after it
has been allocated
On Wed, Jul 24, 2013 at 12:28:02PM -0400, Rhyland Klein wrote:
> + /* Store the pdata pointer after everything else passes */
> + pdev->dev.platform_data = pdata;
No, this is bad - the driver should not be modifying the platform_data
pointer, it's owned by the thing that created the device. If the
platform data needs to be modified it should be copied somewhere in the
driver data.
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists