diff mbox

[1/3] power: bq27xxx_battery: fix platform probe

Message ID 1445003052-31373-2-git-send-email-sre@kernel.org (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Sebastian Reichel Oct. 16, 2015, 1:44 p.m. UTC
Add missing initialization of register mapping table to
platform probe function.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
 drivers/power/bq27xxx_battery.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Pali Rohár Oct. 16, 2015, 2:47 p.m. UTC | #1
On Friday 16 October 2015 15:44:10 Sebastian Reichel wrote:
> Add missing initialization of register mapping table to
> platform probe function.
> 
> Signed-off-by: Sebastian Reichel <sre@kernel.org>
> ---
>  drivers/power/bq27xxx_battery.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/power/bq27xxx_battery.c b/drivers/power/bq27xxx_battery.c
> index 994c78d9f426..69e6b371a51c 100644
> --- a/drivers/power/bq27xxx_battery.c
> +++ b/drivers/power/bq27xxx_battery.c
> @@ -1292,6 +1292,7 @@ static int bq27xxx_battery_platform_probe(struct platform_device *pdev)
>  
>  	di->dev = &pdev->dev;
>  	di->chip = pdata->chip;
> +	di->regs = bq27xxx_regs[di->chip];
>  
>  	name = pdata->name ?: dev_name(&pdev->dev);
>  	di->bus.read = &bq27xxx_battery_platform_read;

Acked-by: Pali Rohár <pali.rohar@gmail.com>
Andrew Davis Oct. 16, 2015, 2:53 p.m. UTC | #2
On 10/16/2015 08:44 AM, Sebastian Reichel wrote:
> Add missing initialization of register mapping table to
> platform probe function.
>
> Signed-off-by: Sebastian Reichel <sre@kernel.org>
> ---
>   drivers/power/bq27xxx_battery.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/drivers/power/bq27xxx_battery.c b/drivers/power/bq27xxx_battery.c
> index 994c78d9f426..69e6b371a51c 100644
> --- a/drivers/power/bq27xxx_battery.c
> +++ b/drivers/power/bq27xxx_battery.c
> @@ -1292,6 +1292,7 @@ static int bq27xxx_battery_platform_probe(struct platform_device *pdev)
>
>   	di->dev = &pdev->dev;
>   	di->chip = pdata->chip;
> +	di->regs = bq27xxx_regs[di->chip];
>
>   	name = pdata->name ?: dev_name(&pdev->dev);
>   	di->bus.read = &bq27xxx_battery_platform_read;
>

Acked-by: Andrew F. Davis <afd@ti.com>
diff mbox

Patch

diff --git a/drivers/power/bq27xxx_battery.c b/drivers/power/bq27xxx_battery.c
index 994c78d9f426..69e6b371a51c 100644
--- a/drivers/power/bq27xxx_battery.c
+++ b/drivers/power/bq27xxx_battery.c
@@ -1292,6 +1292,7 @@  static int bq27xxx_battery_platform_probe(struct platform_device *pdev)
 
 	di->dev = &pdev->dev;
 	di->chip = pdata->chip;
+	di->regs = bq27xxx_regs[di->chip];
 
 	name = pdata->name ?: dev_name(&pdev->dev);
 	di->bus.read = &bq27xxx_battery_platform_read;