From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-arm@nongnu.org, qemu-devel@nongnu.org
Subject: [PATCH 2/6] hw/input/stellaris_gamepad: Rename structs to our usual convention
Date: Tue, 17 Oct 2023 13:22:58 +0100 [thread overview]
Message-ID: <20231017122302.1692902-3-peter.maydell@linaro.org> (raw)
In-Reply-To: <20231017122302.1692902-1-peter.maydell@linaro.org>
Rename the structs in stellaris_gamepad.c to our now-standard
CamelCase convention.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/input/stellaris_gamepad.c | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/hw/input/stellaris_gamepad.c b/hw/input/stellaris_gamepad.c
index 3bab557cab3..377101a4035 100644
--- a/hw/input/stellaris_gamepad.c
+++ b/hw/input/stellaris_gamepad.c
@@ -17,17 +17,17 @@ typedef struct {
qemu_irq irq;
int keycode;
uint8_t pressed;
-} gamepad_button;
+} StellarisGamepadButton;
typedef struct {
- gamepad_button *buttons;
+ StellarisGamepadButton *buttons;
int num_buttons;
int extension;
-} gamepad_state;
+} StellarisGamepad;
static void stellaris_gamepad_put_key(void * opaque, int keycode)
{
- gamepad_state *s = (gamepad_state *)opaque;
+ StellarisGamepad *s = (StellarisGamepad *)opaque;
int i;
int down;
@@ -55,7 +55,7 @@ static const VMStateDescription vmstate_stellaris_button = {
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
- VMSTATE_UINT8(pressed, gamepad_button),
+ VMSTATE_UINT8(pressed, StellarisGamepadButton),
VMSTATE_END_OF_LIST()
}
};
@@ -65,11 +65,11 @@ static const VMStateDescription vmstate_stellaris_gamepad = {
.version_id = 2,
.minimum_version_id = 2,
.fields = (VMStateField[]) {
- VMSTATE_INT32(extension, gamepad_state),
- VMSTATE_STRUCT_VARRAY_POINTER_INT32(buttons, gamepad_state,
+ VMSTATE_INT32(extension, StellarisGamepad),
+ VMSTATE_STRUCT_VARRAY_POINTER_INT32(buttons, StellarisGamepad,
num_buttons,
vmstate_stellaris_button,
- gamepad_button),
+ StellarisGamepadButton),
VMSTATE_END_OF_LIST()
}
};
@@ -77,11 +77,11 @@ static const VMStateDescription vmstate_stellaris_gamepad = {
/* Returns an array of 5 output slots. */
void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode)
{
- gamepad_state *s;
+ StellarisGamepad *s;
int i;
- s = g_new0(gamepad_state, 1);
- s->buttons = g_new0(gamepad_button, n);
+ s = g_new0(StellarisGamepad, 1);
+ s->buttons = g_new0(StellarisGamepadButton, n);
for (i = 0; i < n; i++) {
s->buttons[i].irq = irq[i];
s->buttons[i].keycode = keycode[i];
--
2.34.1
next prev parent reply other threads:[~2023-10-17 12:24 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-17 12:22 [PATCH 0/6] arm/stellaris: convert gamepad input device to qdev Peter Maydell
2023-10-17 12:22 ` [PATCH 1/6] hw/input/stellaris_input: Rename to stellaris_gamepad Peter Maydell
2023-10-17 12:44 ` Philippe Mathieu-Daudé
2023-10-17 12:22 ` Peter Maydell [this message]
2023-10-17 12:44 ` [PATCH 2/6] hw/input/stellaris_gamepad: Rename structs to our usual convention Philippe Mathieu-Daudé
2023-10-17 12:22 ` [PATCH 3/6] qdev: Add qdev_prop_set_array() Peter Maydell
2023-10-17 12:23 ` [PATCH 4/6] hw/input/stellaris_gamepad: Remove StellarisGamepadButton struct Peter Maydell
2023-10-17 12:44 ` Philippe Mathieu-Daudé
2023-10-17 12:52 ` Peter Maydell
2023-10-17 13:09 ` Philippe Mathieu-Daudé
2023-10-17 12:23 ` [PATCH 5/6] hw/input/stellaris_input: Convert to qdev Peter Maydell
2023-10-17 12:48 ` Philippe Mathieu-Daudé
2023-10-17 12:49 ` Peter Maydell
2023-10-17 12:23 ` [PATCH 6/6] hw/input/stellaris_gamepad: Convert to qemu_input_handler_register() Peter Maydell
2023-10-17 13:09 ` Philippe Mathieu-Daudé
2023-10-19 21:47 ` Philippe Mathieu-Daudé
2023-10-30 10:39 ` [PATCH 0/6] arm/stellaris: convert gamepad input device to qdev Philippe Mathieu-Daudé
2023-10-30 11:29 ` Peter Maydell
2023-10-30 13:19 ` Philippe Mathieu-Daudé
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=20231017122302.1692902-3-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).