brintos

brintos / linux-shallow public Read only

0
0
Text · 1.3 KiB · 8963041 Raw
46 lines · c
1// SPDX-License-Identifier: GPL-2.0-only2/*3 *  HID driver for Aureal Cy se W-01RN USB_V3.1 devices4 *5 *  Copyright (c) 2010 Franco Catrin <fcatrin@gmail.com>6 *  Copyright (c) 2010 Ben Cropley <bcropley@internode.on.net>7 *8 *  Based on HID sunplus driver by9 *  Copyright (c) 1999 Andreas Gal10 *  Copyright (c) 2000-2005 Vojtech Pavlik <vojtech@suse.cz>11 *  Copyright (c) 2005 Michael Haboustak <mike-@cinci.rr.com> for Concept2, Inc12 *  Copyright (c) 2006-2007 Jiri Kosina13 *  Copyright (c) 2008 Jiri Slaby14 */15#include <linux/device.h>16#include <linux/hid.h>17#include <linux/module.h>18 19#include "hid-ids.h"20 21static const __u8 *aureal_report_fixup(struct hid_device *hdev, __u8 *rdesc,22		unsigned int *rsize)23{24	if (*rsize >= 54 && rdesc[52] == 0x25 && rdesc[53] == 0x01) {25		dev_info(&hdev->dev, "fixing Aureal Cy se W-01RN USB_V3.1 report descriptor.\n");26		rdesc[53] = 0x65;27	}28	return rdesc;29}30 31static const struct hid_device_id aureal_devices[] = {32	{ HID_USB_DEVICE(USB_VENDOR_ID_AUREAL, USB_DEVICE_ID_AUREAL_W01RN) },33	{ }34};35MODULE_DEVICE_TABLE(hid, aureal_devices);36 37static struct hid_driver aureal_driver = {38	.name = "aureal",39	.id_table = aureal_devices,40	.report_fixup = aureal_report_fixup,41};42module_hid_driver(aureal_driver);43 44MODULE_DESCRIPTION("HID driver for Aureal Cy se W-01RN USB_V3.1 devices");45MODULE_LICENSE("GPL");46