Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Copyright (C) 2005 Dmitry Torokhov
0004  */
0005 
0006 #ifndef __LINUX_USB_INPUT_H
0007 #define __LINUX_USB_INPUT_H
0008 
0009 #include <linux/usb.h>
0010 #include <linux/input.h>
0011 #include <asm/byteorder.h>
0012 
0013 static inline void
0014 usb_to_input_id(const struct usb_device *dev, struct input_id *id)
0015 {
0016     id->bustype = BUS_USB;
0017     id->vendor = le16_to_cpu(dev->descriptor.idVendor);
0018     id->product = le16_to_cpu(dev->descriptor.idProduct);
0019     id->version = le16_to_cpu(dev->descriptor.bcdDevice);
0020 }
0021 
0022 #endif /* __LINUX_USB_INPUT_H */