Re: [PATCH] regulator: palmas: fix pdata ptr not be updated after ithas been allocated

From: Mark Brown
Date: Wed Jul 24 2013 - 13:02:46 EST


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.

Attachment: signature.asc
Description: Digital signature