Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

staging: greybus: hid: remove KERNEL_VERSION checks

No need to support older kernel versions in the Greybus HID driver, so
remove the checks as needed, we can now rely on all of the "new" apis
being present.

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>

-23
-23
drivers/staging/greybus/hid.c
··· 277 277 } 278 278 } 279 279 280 - #if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) 281 - static int gb_hid_get_raw_report(struct hid_device *hid, 282 - unsigned char reportnum, __u8 *buf, 283 - size_t len, unsigned char rtype) 284 - { 285 - return gb_hid_raw_request(hid, reportnum, buf, len, rtype, 286 - HID_REQ_GET_REPORT); 287 - } 288 - 289 - static int gb_hid_output_raw_report(struct hid_device *hid, __u8 *buf, 290 - size_t len, unsigned char rtype) 291 - { 292 - return gb_hid_raw_request(hid, buf[0], buf, len, rtype, 293 - HID_REQ_SET_REPORT); 294 - } 295 - #endif 296 - 297 280 /* HID Callbacks */ 298 281 static int gb_hid_parse(struct hid_device *hid) 299 282 { ··· 405 422 .open = gb_hid_open, 406 423 .close = gb_hid_close, 407 424 .power = gb_hid_power, 408 - #if LINUX_VERSION_CODE >= KERNEL_VERSION(3,15,0) 409 425 .raw_request = gb_hid_raw_request, 410 - #endif 411 426 }; 412 427 413 428 static int gb_hid_init(struct gb_hid *ghid) ··· 425 444 hid->driver_data = ghid; 426 445 hid->ll_driver = &gb_hid_ll_driver; 427 446 hid->dev.parent = &ghid->connection->bundle->dev; 428 - #if LINUX_VERSION_CODE < KERNEL_VERSION(3,15,0) 429 - hid->hid_get_raw_report = gb_hid_get_raw_report; 430 - hid->hid_output_raw_report = gb_hid_output_raw_report; 431 - #endif 432 447 // hid->bus = BUS_GREYBUS; /* Need a bustype for GREYBUS in <linux/input.h> */ 433 448 434 449 /* Set HID device's name */