lkml.org 
[lkml]   [2012]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] max17042_battery: Preserve properties outside of platform data
On Wed, Feb 22, 2012 at 07:06:21PM +0100, Karol Lewandowski wrote:
> Add fields originally found in platform data back to max17042_chip,
> as the former data structure might be not available on device
> tree-based systems.
>
> This commit makes it possible to safely declare platform data with
> __initdata tag.
>
> Signed-off-by: Karol Lewandowski <k.lewandowsk@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> drivers/power/max17042_battery.c | 36 +++++++++++++++++++++++-------------
> 1 files changed, 23 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c
> index 21a3650..49c1377 100644
> --- a/drivers/power/max17042_battery.c
> +++ b/drivers/power/max17042_battery.c
> @@ -33,7 +33,8 @@
> struct max17042_chip {
> struct i2c_client *client;
> struct power_supply battery;
> - struct max17042_platform_data *pdata;
> + bool enable_current_sense;
> + u32 r_sns;

Dirk Brandewie implemented config_data in addition to these
fields, so this patch would have needed a rework. So I decided
to drop this particular patch and rework patch 3/3 to make OF
helper allocat pdata instead.

Thanks,

--
Anton Vorontsov
Email: cbouatmailru@gmail.com


\
 
 \ /
  Last update: 2012-03-13 20:23    [W:0.081 / U:0.724 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site