Re: [PATCH 2/2] Added parameter for selection power supply namefrom pdata

From: Rhyland Klein
Date: Mon Dec 05 2011 - 18:59:11 EST


On Mon, 2011-12-05 at 15:57 -0800, Rhyland Klein wrote:
> Change-Id: Ib0a41ff9ac8c1fc97aa7a87320f8d95be7988d71
> Signed-off-by: Rhyland Klein <rklein@xxxxxxxxxx>
> ---
> drivers/power/sbs-battery.c | 2 +-
> include/linux/power/sbs-battery.h | 2 ++
> 2 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/power/sbs-battery.c b/drivers/power/sbs-battery.c
> index 1e60a54..567b8c1 100644
> --- a/drivers/power/sbs-battery.c
> +++ b/drivers/power/sbs-battery.c
> @@ -615,7 +615,7 @@ static int __devinit sbs_probe(struct i2c_client *client,
> chip->client = client;
> chip->enable_detection = false;
> chip->gpio_detect = false;
> - chip->power_supply.name = "battery";
> + chip->power_supply.name = (pdata->power_supply_name ? : "battery");
> chip->power_supply.type = POWER_SUPPLY_TYPE_BATTERY;
> chip->power_supply.properties = sbs_properties;
> chip->power_supply.num_properties = ARRAY_SIZE(sbs_properties);
> diff --git a/include/linux/power/sbs-battery.h b/include/linux/power/sbs-battery.h
> index 2b0a9d9..fa9bc89 100644
> --- a/include/linux/power/sbs-battery.h
> +++ b/include/linux/power/sbs-battery.h
> @@ -31,12 +31,14 @@
> * @i2c_retry_count: # of times to retry on i2c IO failure
> * @poll_retry_count: # of times to retry looking for new status after
> * external change notification
> + * @power_supply_name: Optional name for power supply: default: battery
> */
> struct sbs_platform_data {
> int battery_detect;
> int battery_detect_present;
> int i2c_retry_count;
> int poll_retry_count;
> + const char *power_supply_name;
> };
>
> #endif

Oops, ignore these, proper patches coming soon.

-rhyland

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/