From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark Brown Subject: Re: [PATCH] regulator: palmas: fix pdata ptr not be updated after it has been allocated Date: Wed, 24 Jul 2013 18:02:15 +0100 Message-ID: <20130724170215.GP9858@sirena.org.uk> References: <1374683282-17517-1-git-send-email-rklein@nvidia.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lnCRbaW8TcgsIoW0" Return-path: Content-Disposition: inline In-Reply-To: <1374683282-17517-1-git-send-email-rklein-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> Sender: linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Rhyland Klein Cc: Liam Girdwood , Joseph Lo , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-tegra@vger.kernel.org --lnCRbaW8TcgsIoW0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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. --lnCRbaW8TcgsIoW0 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) iQIcBAEBAgAGBQJR8AiUAAoJELSic+t+oim9FlsQAIBi3RQKryKif7cc/B4lQAsu tIaEDnE0zkscnMDiq+zhJjQFV6B8uG+v1ASk5TPHgpDYM3jTunQMnMybF+Erq0ld wj7mwmxbix31k/1yS0kNuvE3Jlmo231snhe4ytboOtowmQkCGDDqTV6mlgMMQjhA JlO/HRKnU4Va4/6JcU7VKiGPbUzBtVD9qSx43Iri1BEHUB1YJRTDTBKgG+RHtVzs 4vSttSdvruKhNtIO+Hx0CfDmSv4A0I/+DyBhcQsjN+RWIVIgpxbI0YQ2W7hsFy7T RuhMQwrwmm3iq6+v9jEuxRSoN9t/kZWKgfALszUmKydEkbs8gftwMYICQtMfI9dB A6StW4N+3cidVXQUbtZpLDde6XcKMUhuhx/MVB3v/fP7wh74dW6ckl6NeKvhUaQv ERS5TaSdFaY7p2rcqMh3EobRiuxQ7fDFszEAhEVZZH2Wc1ku1UXfVBOwAnNLul6a M3X/iQ155DV5/WVFzsKwUJo7AbZujPdPrtjYaY+NqIJvaQqF5ebqum/SpUGFx7G6 jx2FBXy9t3u8J622buWY91gAxl5mKAVumwi5lMMZikT7c9lkZwG3hkmnAAmZU1KV 1T5IAxFLmOpywnqjrsCPuXtY/Gex3sihfj0vU1mL2+POBo28+HqzP1AaaWoX97VB bJ979T4SkFLaPScT6KJ9 =EoX9 -----END PGP SIGNATURE----- --lnCRbaW8TcgsIoW0--