aboutsummaryrefslogtreecommitdiff
path: root/hw/i2c.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2012-03-28 18:01:36 +0200
committerAndreas Färber <afaerber@suse.de>2012-06-18 15:14:37 +0200
commit3cb75a7cba7e808c0ae007e4d86750849642304e (patch)
treea4e645a38566e0540d9654fa33e61ac1106968a8 /hw/i2c.c
parent2f262e06f01a38cb8a218b7c5ad71233883a6b55 (diff)
qdev: Move bus properties to a separate global
Simple code movement in order to simplify future refactoring. Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/i2c.c')
-rw-r--r--hw/i2c.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/hw/i2c.c b/hw/i2c.c
index 23dfccba14..cb10b1dec6 100644
--- a/hw/i2c.c
+++ b/hw/i2c.c
@@ -17,13 +17,15 @@ struct i2c_bus
uint8_t saved_address;
};
+static Property i2c_props[] = {
+ DEFINE_PROP_UINT8("address", struct I2CSlave, address, 0),
+ DEFINE_PROP_END_OF_LIST(),
+};
+
static struct BusInfo i2c_bus_info = {
.name = "I2C",
.size = sizeof(i2c_bus),
- .props = (Property[]) {
- DEFINE_PROP_UINT8("address", struct I2CSlave, address, 0),
- DEFINE_PROP_END_OF_LIST(),
- }
+ .props = i2c_props,
};
static void i2c_bus_pre_save(void *opaque)