diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-08-05 17:04:01 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-08-05 17:04:01 -0300 |
commit | 57f0f512b273f60d52568b8c6b77e17f5636edc0 (patch) | |
tree | 5e910f0e82173f4ef4f51111366a3f1299037a7b /include/linux/usb/input.h |
Initial import
Diffstat (limited to 'include/linux/usb/input.h')
-rw-r--r-- | include/linux/usb/input.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/usb/input.h b/include/linux/usb/input.h new file mode 100644 index 000000000..0e010b220 --- /dev/null +++ b/include/linux/usb/input.h @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2005 Dmitry Torokhov + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 as published by + * the Free Software Foundation. + */ + +#ifndef __LINUX_USB_INPUT_H +#define __LINUX_USB_INPUT_H + +#include <linux/usb.h> +#include <linux/input.h> +#include <asm/byteorder.h> + +static inline void +usb_to_input_id(const struct usb_device *dev, struct input_id *id) +{ + id->bustype = BUS_USB; + id->vendor = le16_to_cpu(dev->descriptor.idVendor); + id->product = le16_to_cpu(dev->descriptor.idProduct); + id->version = le16_to_cpu(dev->descriptor.bcdDevice); +} + +#endif /* __LINUX_USB_INPUT_H */ |