.. | .. |
---|
12 | 12 | #include <linux/module.h> |
---|
13 | 13 | #include <linux/mutex.h> |
---|
14 | 14 | #include <linux/slab.h> |
---|
15 | | - |
---|
16 | | -#include "greybus.h" |
---|
| 15 | +#include <linux/greybus.h> |
---|
17 | 16 | |
---|
18 | 17 | /* Greybus HID device's structure */ |
---|
19 | 18 | struct gb_hid { |
---|
.. | .. |
---|
49 | 48 | return ret; |
---|
50 | 49 | |
---|
51 | 50 | ret = gb_operation_sync(ghid->connection, GB_HID_TYPE_GET_REPORT_DESC, |
---|
52 | | - NULL, 0, rdesc, |
---|
53 | | - le16_to_cpu(ghid->hdesc.wReportDescLength)); |
---|
| 51 | + NULL, 0, rdesc, |
---|
| 52 | + le16_to_cpu(ghid->hdesc.wReportDescLength)); |
---|
54 | 53 | |
---|
55 | 54 | gb_pm_runtime_put_autosuspend(ghid->bundle); |
---|
56 | 55 | |
---|
.. | .. |
---|
86 | 85 | request.report_id = report_id; |
---|
87 | 86 | |
---|
88 | 87 | ret = gb_operation_sync(ghid->connection, GB_HID_TYPE_GET_REPORT, |
---|
89 | | - &request, sizeof(request), buf, len); |
---|
| 88 | + &request, sizeof(request), buf, len); |
---|
90 | 89 | |
---|
91 | 90 | gb_pm_runtime_put_autosuspend(ghid->bundle); |
---|
92 | 91 | |
---|
.. | .. |
---|
211 | 210 | struct hid_report *report; |
---|
212 | 211 | |
---|
213 | 212 | list_for_each_entry(report, |
---|
214 | | - &hid->report_enum[HID_INPUT_REPORT].report_list, list) |
---|
| 213 | + &hid->report_enum[HID_INPUT_REPORT].report_list, |
---|
| 214 | + list) |
---|
215 | 215 | gb_hid_init_report(ghid, report); |
---|
216 | 216 | |
---|
217 | 217 | list_for_each_entry(report, |
---|
218 | | - &hid->report_enum[HID_FEATURE_REPORT].report_list, list) |
---|
| 218 | + &hid->report_enum[HID_FEATURE_REPORT].report_list, |
---|
| 219 | + list) |
---|
219 | 220 | gb_hid_init_report(ghid, report); |
---|
220 | 221 | } |
---|
221 | 222 | |
---|
.. | .. |
---|
259 | 260 | } |
---|
260 | 261 | |
---|
261 | 262 | static int gb_hid_raw_request(struct hid_device *hid, unsigned char reportnum, |
---|
262 | | - __u8 *buf, size_t len, unsigned char rtype, |
---|
263 | | - int reqtype) |
---|
| 263 | + __u8 *buf, size_t len, unsigned char rtype, |
---|
| 264 | + int reqtype) |
---|
264 | 265 | { |
---|
265 | 266 | switch (reqtype) { |
---|
266 | 267 | case HID_REQ_GET_REPORT: |
---|
.. | .. |
---|
289 | 290 | } |
---|
290 | 291 | |
---|
291 | 292 | rdesc = kzalloc(rsize, GFP_KERNEL); |
---|
292 | | - if (!rdesc) { |
---|
293 | | - dbg_hid("couldn't allocate rdesc memory\n"); |
---|
| 293 | + if (!rdesc) |
---|
294 | 294 | return -ENOMEM; |
---|
295 | | - } |
---|
296 | 295 | |
---|
297 | 296 | ret = gb_hid_get_report_desc(ghid, rdesc); |
---|
298 | 297 | if (ret) { |
---|
.. | .. |
---|
440 | 439 | return -ENOMEM; |
---|
441 | 440 | |
---|
442 | 441 | connection = gb_connection_create(bundle, le16_to_cpu(cport_desc->id), |
---|
443 | | - gb_hid_request_handler); |
---|
| 442 | + gb_hid_request_handler); |
---|
444 | 443 | if (IS_ERR(connection)) { |
---|
445 | 444 | ret = PTR_ERR(connection); |
---|
446 | 445 | goto err_free_ghid; |
---|