diff options
author | Andrew Scull | 2022-05-16 10:41:34 +0000 |
---|---|---|
committer | Tom Rini | 2022-06-08 09:24:03 -0400 |
commit | 1674b6c4d820a4139c406d673a3319f785503a5d (patch) | |
tree | ca096f3c7b02a83ca336e2a2e17e13499552c83f /drivers/virtio | |
parent | b1fe820b63c45d6ed0c44b67b4a48e5f3ac34bf0 (diff) |
virtio: sandbox: Fix device features bitfield
The virtio sandbox transport was setting the device features value to
the bit index rather than shifting a bit to the right index. Fix this
using the bit manipulation macros.
Signed-off-by: Andrew Scull <ascull@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/virtio')
-rw-r--r-- | drivers/virtio/virtio_sandbox.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/virtio/virtio_sandbox.c b/drivers/virtio/virtio_sandbox.c index aafb7beb949..a73b1234544 100644 --- a/drivers/virtio/virtio_sandbox.c +++ b/drivers/virtio/virtio_sandbox.c @@ -160,7 +160,7 @@ static int virtio_sandbox_probe(struct udevice *udev) struct virtio_dev_priv *uc_priv = dev_get_uclass_priv(udev); /* fake some information for testing */ - priv->device_features = VIRTIO_F_VERSION_1; + priv->device_features = BIT_ULL(VIRTIO_F_VERSION_1); uc_priv->device = VIRTIO_ID_BLOCK; uc_priv->vendor = ('u' << 24) | ('b' << 16) | ('o' << 8) | 't'; |