diff options
author | Grant Likely <grant.likely@secretlab.ca> | 2012-02-28 14:48:58 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-02-28 14:48:58 -0500 |
commit | b3950d50cfc343b3e7dc5c69c96a61b182fd1e37 (patch) | |
tree | d54affae2b1e25464493b48aa88cd8d6b4770812 /drivers/hid/hid-wacom.c | |
parent | daefd89efc279b142bbb054577c2d706da211723 (diff) | |
parent | 280ad7fda5f95211857fda38960f2b6fdf6edd3e (diff) |
Merge branch 'irqdomain/next' into gpio/next
Diffstat (limited to 'drivers/hid/hid-wacom.c')
-rw-r--r-- | drivers/hid/hid-wacom.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/hid/hid-wacom.c b/drivers/hid/hid-wacom.c index b47e58b52d9f..acab74cde727 100644 --- a/drivers/hid/hid-wacom.c +++ b/drivers/hid/hid-wacom.c | |||
@@ -531,7 +531,6 @@ static int wacom_probe(struct hid_device *hdev, | |||
531 | wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY; | 531 | wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY; |
532 | wdata->battery.use_for_apm = 0; | 532 | wdata->battery.use_for_apm = 0; |
533 | 533 | ||
534 | power_supply_powers(&wdata->battery, &hdev->dev); | ||
535 | 534 | ||
536 | ret = power_supply_register(&hdev->dev, &wdata->battery); | 535 | ret = power_supply_register(&hdev->dev, &wdata->battery); |
537 | if (ret) { | 536 | if (ret) { |
@@ -540,6 +539,8 @@ static int wacom_probe(struct hid_device *hdev, | |||
540 | goto err_battery; | 539 | goto err_battery; |
541 | } | 540 | } |
542 | 541 | ||
542 | power_supply_powers(&wdata->battery, &hdev->dev); | ||
543 | |||
543 | wdata->ac.properties = wacom_ac_props; | 544 | wdata->ac.properties = wacom_ac_props; |
544 | wdata->ac.num_properties = ARRAY_SIZE(wacom_ac_props); | 545 | wdata->ac.num_properties = ARRAY_SIZE(wacom_ac_props); |
545 | wdata->ac.get_property = wacom_ac_get_property; | 546 | wdata->ac.get_property = wacom_ac_get_property; |
@@ -547,14 +548,14 @@ static int wacom_probe(struct hid_device *hdev, | |||
547 | wdata->ac.type = POWER_SUPPLY_TYPE_MAINS; | 548 | wdata->ac.type = POWER_SUPPLY_TYPE_MAINS; |
548 | wdata->ac.use_for_apm = 0; | 549 | wdata->ac.use_for_apm = 0; |
549 | 550 | ||
550 | power_supply_powers(&wdata->battery, &hdev->dev); | ||
551 | |||
552 | ret = power_supply_register(&hdev->dev, &wdata->ac); | 551 | ret = power_supply_register(&hdev->dev, &wdata->ac); |
553 | if (ret) { | 552 | if (ret) { |
554 | hid_warn(hdev, | 553 | hid_warn(hdev, |
555 | "can't create ac battery attribute, err: %d\n", ret); | 554 | "can't create ac battery attribute, err: %d\n", ret); |
556 | goto err_ac; | 555 | goto err_ac; |
557 | } | 556 | } |
557 | |||
558 | power_supply_powers(&wdata->ac, &hdev->dev); | ||
558 | #endif | 559 | #endif |
559 | return 0; | 560 | return 0; |
560 | 561 | ||