mirror of https://github.com/xemu-project/xemu.git
virtio-input: two small fixups
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJVbWozAAoJEEy22O7T6HE4MsIQALUNpRUD2vEll2Qq1d9Ayljb sXNYG7iT84CrP5cI3I0ZMJIwPbZrem69B8UIZq065FO3APZODnY5dW8g45BP8xpk d6B1ie+lPdOo1EgRABXDRIMtbLb81etcSLL0vnYzqVFA2jUE6wveRWqXhvIC8weT r7nKsUu+WzsaTO0T9y9oypeoscPP/Bkv75EbzoTAPZYq8fiSb4Qvh4OJ6cDef7J+ JGSxEgbiXlXNynDuhdc3TYpQ9F5NaSEjJHG4QqCQ+MvE5I6yXf4zkc+4JKBCbXrW kDenjOmY+5cm396A4e6a1uJ289cwFzInVH9jn2NGnPPO++QQHrheFVjfw4QzW9bQ ERjJ1EofyvB+BoiOoU86ttCKipdDsjVm1hOW1xsxudH4cjNLw57kqSRsPZwXQJQS Sx6wnu9L14Nnb12rxB8peDkSNN6XSAloo2zFsbJavynzMfBfShQdQm5gc+sX8/2q Co15inAOwVtK9it2XZL635Ve09ZSWVg0t5iFx0JuqqgDSyjj5xqCmscEFKSUBrqo A7EfGvMX6Fbbl3JXtV5i2BqmmV1hwaU6MV2GK6TPNapfuPpxoIr3BIocm6JJqiBS qt2ISAsVuzaWcBJCwa+8Xf5Vd/yeh88AU+qxMho5yZTmpJtvCG6fOA4oQX9n6rwM egSwmUjW4AHNpTtuVaVY =/GX3 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/pull-input-20150602-1' into staging virtio-input: two small fixups # gpg: Signature made Tue Jun 2 09:32:51 2015 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-input-20150602-1: virtio-input: make virtio devices follow usual naming convention virtio-input: const_le16 and const_le32 not build time constant Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
25611aa12b
|
@ -14,8 +14,14 @@ typedef struct virtio_input_config virtio_input_config;
|
|||
typedef struct virtio_input_event virtio_input_event;
|
||||
|
||||
#if defined(HOST_WORDS_BIGENDIAN)
|
||||
# define const_le32(_x) bswap32(_x)
|
||||
# define const_le16(_x) bswap32(_x)
|
||||
# define const_le32(_x) \
|
||||
(((_x & 0x000000ffU) << 24) | \
|
||||
((_x & 0x0000ff00U) << 8) | \
|
||||
((_x & 0x00ff0000U) >> 8) | \
|
||||
((_x & 0xff000000U) >> 24))
|
||||
# define const_le16(_x) \
|
||||
(((_x & 0x00ff) << 8) | \
|
||||
((_x & 0xff00) >> 8))
|
||||
#else
|
||||
# define const_le32(_x) (_x)
|
||||
# define const_le16(_x) (_x)
|
||||
|
@ -34,10 +40,10 @@ typedef struct virtio_input_event virtio_input_event;
|
|||
#define VIRTIO_INPUT_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(VirtIOInputClass, klass, TYPE_VIRTIO_INPUT)
|
||||
|
||||
#define TYPE_VIRTIO_INPUT_HID "virtio-input-hid"
|
||||
#define TYPE_VIRTIO_KEYBOARD "virtio-keyboard"
|
||||
#define TYPE_VIRTIO_MOUSE "virtio-mouse"
|
||||
#define TYPE_VIRTIO_TABLET "virtio-tablet"
|
||||
#define TYPE_VIRTIO_INPUT_HID "virtio-input-hid-device"
|
||||
#define TYPE_VIRTIO_KEYBOARD "virtio-keyboard-device"
|
||||
#define TYPE_VIRTIO_MOUSE "virtio-mouse-device"
|
||||
#define TYPE_VIRTIO_TABLET "virtio-tablet-device"
|
||||
|
||||
#define VIRTIO_INPUT_HID(obj) \
|
||||
OBJECT_CHECK(VirtIOInputHID, (obj), TYPE_VIRTIO_INPUT_HID)
|
||||
|
|
Loading…
Reference in New Issue