lkml.org 
[lkml]   [2009]   [Jul]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[rfc/patch 05/15] power: bq27200: remove unnecessary function
Date
that init function was completely unnecessary.

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
---
drivers/power/bq27200_battery.c | 15 +++++----------
1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/drivers/power/bq27200_battery.c b/drivers/power/bq27200_battery.c
index eddb731..deef1b5 100644
--- a/drivers/power/bq27200_battery.c
+++ b/drivers/power/bq27200_battery.c
@@ -164,15 +164,6 @@ static int bq27200_get_property(struct power_supply *psy,
return 0;
}

-static void bq27200_powersupply_init(struct bq27200_device_info *di)
-{
- di->bat.type = POWER_SUPPLY_TYPE_BATTERY;
- di->bat.properties = bq27200_props;
- di->bat.num_properties = ARRAY_SIZE(bq27200_props);
- di->bat.get_property = bq27200_get_property;
- di->bat.external_power_changed = NULL;
-}
-
static int bq27200_battery_probe(struct i2c_client *client,
const struct i2c_device_id *id)
{
@@ -191,7 +182,11 @@ static int bq27200_battery_probe(struct i2c_client *client,
di->bat.name = client->name;
di->client = client;

- bq27200_powersupply_init(di);
+ di->bat.type = POWER_SUPPLY_TYPE_BATTERY;
+ di->bat.properties = bq27200_props;
+ di->bat.num_properties = ARRAY_SIZE(bq27200_props);
+ di->bat.get_property = bq27200_get_property;
+ di->bat.external_power_changed = NULL;

retval = power_supply_register(&client->dev, &di->bat);
if (retval) {
--
1.6.1.3


\
 
 \ /
  Last update: 2009-07-12 20:33    [W:0.073 / U:0.028 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site