mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
Merge branches 'for-3.12/devm', 'for-3.12/i2c-hid', 'for-3.12/i2c-hid-dt', 'for-3.12/logitech', 'for-3.12/multitouch-win8', 'for-3.12/trasnport-driver-cleanup', 'for-3.12/uhid', 'for-3.12/upstream' and 'for-3.12/wiimote' into for-linus
This commit is contained in:
commit
63faf15dba
54 changed files with 1325 additions and 458 deletions
|
@ -349,7 +349,7 @@ static int apple_probe(struct hid_device *hdev,
|
|||
unsigned int connect_mask = HID_CONNECT_DEFAULT;
|
||||
int ret;
|
||||
|
||||
asc = kzalloc(sizeof(*asc), GFP_KERNEL);
|
||||
asc = devm_kzalloc(&hdev->dev, sizeof(*asc), GFP_KERNEL);
|
||||
if (asc == NULL) {
|
||||
hid_err(hdev, "can't alloc apple descriptor\n");
|
||||
return -ENOMEM;
|
||||
|
@ -362,7 +362,7 @@ static int apple_probe(struct hid_device *hdev,
|
|||
ret = hid_parse(hdev);
|
||||
if (ret) {
|
||||
hid_err(hdev, "parse failed\n");
|
||||
goto err_free;
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (quirks & APPLE_HIDDEV)
|
||||
|
@ -373,19 +373,10 @@ static int apple_probe(struct hid_device *hdev,
|
|||
ret = hid_hw_start(hdev, connect_mask);
|
||||
if (ret) {
|
||||
hid_err(hdev, "hw start failed\n");
|
||||
goto err_free;
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
err_free:
|
||||
kfree(asc);
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void apple_remove(struct hid_device *hdev)
|
||||
{
|
||||
hid_hw_stop(hdev);
|
||||
kfree(hid_get_drvdata(hdev));
|
||||
}
|
||||
|
||||
static const struct hid_device_id apple_devices[] = {
|
||||
|
@ -551,7 +542,6 @@ static struct hid_driver apple_driver = {
|
|||
.id_table = apple_devices,
|
||||
.report_fixup = apple_report_fixup,
|
||||
.probe = apple_probe,
|
||||
.remove = apple_remove,
|
||||
.event = apple_event,
|
||||
.input_mapping = apple_input_mapping,
|
||||
.input_mapped = apple_input_mapped,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue