Skip to content

Commit

Permalink
HID: wiimote: fix invalid power_supply_powers call
Browse files Browse the repository at this point in the history
Analogically to d7cb3dbd1 ("HID: wacom: Fix invalid power_supply_powers
calls"), fix also the same occurence in wiimote driver.

Reported-by: przemo@firszt.eu
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
  • Loading branch information
Jiri Kosina committed Feb 7, 2012
1 parent d7cb3db commit 217c8b2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/hid/hid-wiimote-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,14 +1226,14 @@ static int wiimote_hid_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(&wdata->hdev->dev, &wdata->battery);
if (ret) {
hid_err(hdev, "Cannot register battery device\n");
goto err_battery;
}

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

ret = wiimote_leds_create(wdata);
if (ret)
goto err_free;
Expand Down

0 comments on commit 217c8b2

Please sign in to comment.