aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/led.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/misc/led.c')
-rw-r--r--hw/misc/led.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/hw/misc/led.c b/hw/misc/led.c
index d9998ab..f7f7090 100644
--- a/hw/misc/led.c
+++ b/hw/misc/led.c
@@ -101,20 +101,19 @@ static void led_realize(DeviceState *dev, Error **errp)
qdev_init_gpio_in(DEVICE(s), led_set_state_gpio_handler, 1);
}
-static Property led_properties[] = {
+static const Property led_properties[] = {
DEFINE_PROP_STRING("color", LEDState, color),
DEFINE_PROP_STRING("description", LEDState, description),
DEFINE_PROP_BOOL("gpio-active-high", LEDState, gpio_active_high, true),
- DEFINE_PROP_END_OF_LIST(),
};
-static void led_class_init(ObjectClass *klass, void *data)
+static void led_class_init(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
dc->desc = "LED";
dc->vmsd = &vmstate_led;
- dc->reset = led_reset;
+ device_class_set_legacy_reset(dc, led_reset);
dc->realize = led_realize;
set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories);
device_class_set_props(dc, led_properties);