diff options
author | Jiri Kosina <jkosina@suse.cz> | 2012-02-07 07:40:56 -0500 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2012-02-07 07:40:56 -0500 |
commit | 217c8b2b1978aa4a02ce040a99c59ed3b6418fe5 (patch) | |
tree | 8577b6f95ee1fd924e19831528a8a1f929d7066a /drivers/hid/hid-wiimote-core.c | |
parent | d7cb3dbd10c09081fafd05fcbef590ce04e402ff (diff) |
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/hid-wiimote-core.c')
-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, | |||
1226 | wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY; | 1226 | wdata->battery.type = POWER_SUPPLY_TYPE_BATTERY; |
1227 | wdata->battery.use_for_apm = 0; | 1227 | wdata->battery.use_for_apm = 0; |
1228 | 1228 | ||
1229 | power_supply_powers(&wdata->battery, &hdev->dev); | ||
1230 | |||
1231 | ret = power_supply_register(&wdata->hdev->dev, &wdata->battery); | 1229 | ret = power_supply_register(&wdata->hdev->dev, &wdata->battery); |
1232 | if (ret) { | 1230 | if (ret) { |
1233 | hid_err(hdev, "Cannot register battery device\n"); | 1231 | hid_err(hdev, "Cannot register battery device\n"); |
1234 | goto err_battery; | 1232 | goto err_battery; |
1235 | } | 1233 | } |
1236 | 1234 | ||
1235 | power_supply_powers(&wdata->battery, &hdev->dev); | ||
1236 | |||
1237 | ret = wiimote_leds_create(wdata); | 1237 | ret = wiimote_leds_create(wdata); |
1238 | if (ret) | 1238 | if (ret) |
1239 | goto err_free; | 1239 | goto err_free; |