Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 367506
b: refs/heads/master
c: 9c1d1af
h: refs/heads/master
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Anton Vorontsov committed Apr 1, 2013
1 parent fd18d05 commit 5c8bf7a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 43cf454aba2516799d571472fa69425e1e15c4bc
refs/heads/master: 9c1d1af0cf78a7e8967194a4ee424b0742a52921
18 changes: 10 additions & 8 deletions trunk/drivers/power/sbs-battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,10 +820,11 @@ static int sbs_remove(struct i2c_client *client)
return 0;
}

#if defined CONFIG_PM
static int sbs_suspend(struct i2c_client *client,
pm_message_t state)
#if defined CONFIG_PM_SLEEP

static int sbs_suspend(struct device *dev)
{
struct i2c_client *client = to_i2c_client(dev);
struct sbs_info *chip = i2c_get_clientdata(client);
s32 ret;

Expand All @@ -838,11 +839,13 @@ static int sbs_suspend(struct i2c_client *client,

return 0;
}

static SIMPLE_DEV_PM_OPS(sbs_pm_ops, sbs_suspend, NULL);
#define SBS_PM_OPS (&sbs_pm_ops)

#else
#define sbs_suspend NULL
#define SBS_PM_OPS NULL
#endif
/* any smbus transaction will wake up sbs */
#define sbs_resume NULL

static const struct i2c_device_id sbs_id[] = {
{ "bq20z75", 0 },
Expand All @@ -854,12 +857,11 @@ MODULE_DEVICE_TABLE(i2c, sbs_id);
static struct i2c_driver sbs_battery_driver = {
.probe = sbs_probe,
.remove = sbs_remove,
.suspend = sbs_suspend,
.resume = sbs_resume,
.id_table = sbs_id,
.driver = {
.name = "sbs-battery",
.of_match_table = of_match_ptr(sbs_dt_ids),
.pm = SBS_PM_OPS,
},
};
module_i2c_driver(sbs_battery_driver);
Expand Down

0 comments on commit 5c8bf7a

Please sign in to comment.