提交 217c8b2b 编写于 作者: J Jiri Kosina

HID: wiimote: fix invalid power_supply_powers call

Analogically to d7cb3dbd ("HID: wacom: Fix invalid power_supply_powers
calls"), fix also the same occurence in wiimote driver.

Reported-by: przemo@firszt.eu
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 d7cb3dbd
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册