Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 287283
b: refs/heads/master
c: d7cb3db
h: refs/heads/master
i:
  287281: 93d4795
  287279: dfc93ab
v: v3
  • Loading branch information
Przemo Firszt authored and Jiri Kosina committed Feb 6, 2012
1 parent 2cb7421 commit d07d74a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 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: d4730ace0c7dbb64513e35b6fc5fd7e7f381e490
refs/heads/master: d7cb3dbd10c09081fafd05fcbef590ce04e402ff
7 changes: 4 additions & 3 deletions trunk/drivers/hid/hid-wacom.c
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,6 @@ static int wacom_probe(struct hid_device *hdev,
wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY;
wdata->battery.use_for_apm = 0;

power_supply_powers(&wdata->battery, &hdev->dev);

ret = power_supply_register(&hdev->dev, &wdata->battery);
if (ret) {
Expand All @@ -540,21 +539,23 @@ static int wacom_probe(struct hid_device *hdev,
goto err_battery;
}

power_supply_powers(&wdata->battery, &hdev->dev);

wdata->ac.properties = wacom_ac_props;
wdata->ac.num_properties = ARRAY_SIZE(wacom_ac_props);
wdata->ac.get_property = wacom_ac_get_property;
wdata->ac.name = "wacom_ac";
wdata->ac.type = POWER_SUPPLY_TYPE_MAINS;
wdata->ac.use_for_apm = 0;

power_supply_powers(&wdata->battery, &hdev->dev);

ret = power_supply_register(&hdev->dev, &wdata->ac);
if (ret) {
hid_warn(hdev,
"can't create ac battery attribute, err: %d\n", ret);
goto err_ac;
}

power_supply_powers(&wdata->ac, &hdev->dev);
#endif
return 0;

Expand Down

0 comments on commit d07d74a

Please sign in to comment.