From: "Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Mark Cave-Ayland" <mark.cave-ayland@ilande.co.uk>,
qemu-ppc@nongnu.org, "Michael S. Tsirkin" <mst@redhat.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Oscar Alejandro Sánchez Lucero" <aleszlucero@gmail.com>
Subject: [PATCH 1/3] hw/input/adb-kbd: Convert to Resettable interface
Date: Mon, 30 Nov 2026 14:32:52 +0000 [thread overview]
Message-ID: <20261130-input-resettable-v1-1-e5c5893abf4f@gmail.com> (raw)
In-Reply-To: <20261130-input-resettable-v1-0-e5c5893abf4f@gmail.com>
Replace the deprecated device_class_set_legacy_reset() with the
Resettable interface by implementing the hold phase in
adb_kbd_reset_hold().
Signed-off-by: Oscar Alejandro Sánchez Lucero <aleszlucero@gmail.com>
---
hw/input/adb-kbd.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/input/adb-kbd.c b/hw/input/adb-kbd.c
index ece51d5..ffd5bf8 100644
--- a/hw/input/adb-kbd.c
+++ b/hw/input/adb-kbd.c
@@ -342,10 +342,10 @@ static const VMStateDescription vmstate_adb_kbd = {
}
};
-static void adb_kbd_reset(DeviceState *dev)
+static void adb_kbd_reset_hold(Object *obj, ResetType type)
{
- ADBDevice *d = ADB_DEVICE(dev);
- KBDState *s = ADB_KEYBOARD(dev);
+ ADBDevice *d = ADB_DEVICE(obj);
+ KBDState *s = ADB_KEYBOARD(obj);
d->handler = 1;
d->devaddr = ADB_DEVID_KEYBOARD;
@@ -400,7 +400,7 @@ static void adb_kbd_class_init(ObjectClass *oc, const void *data)
adc->devreq = adb_kbd_request;
adc->devhasdata = adb_kbd_has_data;
- device_class_set_legacy_reset(dc, adb_kbd_reset);
+ RESETTABLE_CLASS(oc)->phases.hold = adb_kbd_reset_hold;
dc->vmsd = &vmstate_adb_kbd;
}
--
2.53.0
next prev parent reply other threads:[~2026-11-30 14:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 14:32 [PATCH 0/3] hw/input: Convert remaining input devices to Resettable interface Oscar Alejandro Sánchez Lucero
2026-11-30 14:32 ` Oscar Alejandro Sánchez Lucero [this message]
2026-12-01 13:14 ` [PATCH 1/3] hw/input/adb-kbd: Convert " Bin Meng
2026-11-30 14:32 ` [PATCH 2/3] hw/input/adb-mouse: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:15 ` Bin Meng
2026-11-30 14:32 ` [PATCH 3/3] hw/input/pckbd: " Oscar Alejandro Sánchez Lucero
2026-12-01 13:15 ` Bin Meng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130-input-resettable-v1-1-e5c5893abf4f@gmail.com \
--to=aleszlucero@gmail.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.