Skip to contentSkip to conversation

pl050: Don't send always-constant is_mouse field

PATCH New Peter Maydell 1 participant 1 message Mar 18, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pl050: Don't send always-constant is_mouse field

The is_mouse field of the pl050 state structure is constant (it tracks whether this is a 'pl050_keyboard' or 'pl050_mouse'), so there's no need to include it in the VMState structure.

---
It doesn't hurt to carry around the is_mouse field, I guess, but I thought it nicer to do the cleanup now while we still don't care about between version migration.

 hw/pl050.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
hw/pl050.c +2 -3
index bc31ab6..76735a0 100644
@@ -24,14 +24,13 @@ typedef struct {
 
 static const VMStateDescription vmstate_pl050 = {
     .name = "pl050",
-    .version_id = 1,
-    .minimum_version_id = 1,
+    .version_id = 2,
+    .minimum_version_id = 2,
     .fields = (VMStateField[]) {
         VMSTATE_UINT32(cr, pl050_state),
         VMSTATE_UINT32(clk, pl050_state),
         VMSTATE_UINT32(last, pl050_state),
         VMSTATE_INT32(pending, pl050_state),
-        VMSTATE_INT32(is_mouse, pl050_state),
         VMSTATE_END_OF_LIST()
     }
 };
Signature · 1 line
1.7.9.5