aboutsummaryrefslogtreecommitdiff
path: root/rust
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2024-10-15 14:46:42 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2024-11-05 14:18:16 +0100
commitf60f3670fd15edaa9dc6471dde26703b4417b815 (patch)
treef4db562c0569fdf0bdc12896d9d6079419910e10 /rust
parent6e50bde1e1c8edc70145fb87b21b0d0843250600 (diff)
downloadqemu-f60f3670fd15edaa9dc6471dde26703b4417b815.zip
qemu-f60f3670fd15edaa9dc6471dde26703b4417b815.tar.gz
qemu-f60f3670fd15edaa9dc6471dde26703b4417b815.tar.bz2
rust: do not use TYPE_CHARDEV unnecessarily
In the invocation of qdev_prop_set_chr(), "chardev" is the name of a property rather than a type and has to match the name of the property in device_class.rs. Do not use TYPE_CHARDEV here, just like in the C version of pl011_create. Reviewed-by: Junjie Mao <junjie.mao@hotmail.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'rust')
-rw-r--r--rust/hw/char/pl011/src/device.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/rust/hw/char/pl011/src/device.rs b/rust/hw/char/pl011/src/device.rs
index 0347a02..b3d8bc0 100644
--- a/rust/hw/char/pl011/src/device.rs
+++ b/rust/hw/char/pl011/src/device.rs
@@ -573,7 +573,7 @@ pub unsafe extern "C" fn pl011_create(
let dev: *mut DeviceState = qdev_new(PL011State::TYPE_INFO.name);
let sysbus: *mut SysBusDevice = dev.cast::<SysBusDevice>();
- qdev_prop_set_chr(dev, bindings::TYPE_CHARDEV.as_ptr(), chr);
+ qdev_prop_set_chr(dev, c"chardev".as_ptr(), chr);
sysbus_realize_and_unref(sysbus, addr_of!(error_fatal) as *mut *mut Error);
sysbus_mmio_map(sysbus, 0, addr);
sysbus_connect_irq(sysbus, 0, irq);