Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1425515 > unrolled thread

Re: [PATCH 3/3] power_supply: bq27xxx_battery: Group register mappings into one table

Started by"Andrew F. Davis" <afd@ti.com>
First post2016-06-18 00:10 +0200
Last post2016-06-18 00:10 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 3/3] power_supply: bq27xxx_battery: Group register  mappings into one table "Andrew F. Davis" <afd@ti.com> - 2016-06-18 00:10 +0200

#1425515 — Re: [PATCH 3/3] power_supply: bq27xxx_battery: Group register mappings into one table

From"Andrew F. Davis" <afd@ti.com>
Date2016-06-18 00:10 +0200
SubjectRe: [PATCH 3/3] power_supply: bq27xxx_battery: Group register mappings into one table
Message-ID<rLa7D-3SN-7@gated-at.bofh.it>
On 06/09/2016 08:29 PM, Sebastian Reichel wrote:
> Hi,
> 
> On Tue, May 31, 2016 at 01:45:00PM -0500, Andrew F. Davis wrote:
>> Currently for each device with a unique register map we have a named
>> array that we then merge into a multidimensional array. Skip this
>> middle step and apply the register arrays directly to the multi-array.
> 
> I applied the first two patches, but the third (this one) does not
> compile for me:
> 
>   CC [M]  drivers/power/bq27xxx_battery.o
> drivers/power/bq27xxx_battery.c:108:2: warning: braces around scalar initializer
>   [BQ27000] = {
>   ^
> drivers/power/bq27xxx_battery.c:108:2: note: (near initialization for ‘bq27xxx_regs[1]’)
> drivers/power/bq27xxx_battery.c:109:4: error: array index in non-array initializer
>    [BQ27XXX_REG_CTRL] = 0x00,
>     ^
> drivers/power/bq27xxx_battery.c:109:4: note: (near initialization for ‘bq27xxx_regs[1]’)
> drivers/power/bq27xxx_battery.c:110:4: error: array index in non-array initializer
>    [BQ27XXX_REG_TEMP] = 0x06,
>     ^
> ...
> 

That's odd, I looks like I was attempting a jagged array in C, oops :)
I'll post v2 with this fixed.

Thanks,
Andrew

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web