diff options
author | Jiri Kosina <jkosina@suse.cz> | 2012-02-07 16:40:56 +0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-02-07 16:40:56 +0400 |
commit | 217c8b2b1978aa4a02ce040a99c59ed3b6418fe5 (patch) | |
tree | 8577b6f95ee1fd924e19831528a8a1f929d7066a /drivers/hid | |
parent | d7cb3dbd10c09081fafd05fcbef590ce04e402ff (diff) | |
download | linux-217c8b2b1978aa4a02ce040a99c59ed3b6418fe5.tar.xz |
HID: wiimote: fix invalid power_supply_powers call
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r-- | drivers/hid/hid-wiimote-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index fc253b472f9d..cac3589b1ed5 100644 --- a/drivers/hid/hid-wiimote-core.c +++ b/drivers/hid/hid-wiimote-core.c @@ -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; |