Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP3:GA
qemu-linux-user.9343
0149-wdt_i6300esb-QOMify.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0149-wdt_i6300esb-QOMify.patch of Package qemu-linux-user.9343
From 181f316572d99d5683d80412f15b149fb6c6c9b2 Mon Sep 17 00:00:00 2001 From: Gonglei <arei.gonglei@huawei.com> Date: Wed, 13 May 2015 08:43:25 +0800 Subject: [PATCH] wdt_i6300esb: QOMify Signed-off-by: Gonglei <arei.gonglei@huawei.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru> --- hw/watchdog/wdt_i6300esb.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/hw/watchdog/wdt_i6300esb.c b/hw/watchdog/wdt_i6300esb.c index 4ebdbb8586..cfa2b1be13 100644 --- a/hw/watchdog/wdt_i6300esb.c +++ b/hw/watchdog/wdt_i6300esb.c @@ -103,6 +103,10 @@ struct I6300State { typedef struct I6300State I6300State; +#define TYPE_WATCHDOG_I6300ESB_DEVICE "i6300esb" +#define WATCHDOG_I6300ESB_DEVICE(obj) \ + OBJECT_CHECK(I6300State, (obj), TYPE_WATCHDOG_I6300ESB_DEVICE) + /* This function is called when the watchdog has either been enabled * (hence it starts counting down) or has been keep-alived. */ @@ -150,7 +154,7 @@ static void i6300esb_disable_timer(I6300State *d) static void i6300esb_reset(DeviceState *dev) { PCIDevice *pdev = PCI_DEVICE(dev); - I6300State *d = DO_UPCAST(I6300State, dev, pdev); + I6300State *d = WATCHDOG_I6300ESB_DEVICE(pdev); i6300esb_debug("I6300State = %p\n", d); @@ -213,7 +217,7 @@ static void i6300esb_timer_expired(void *vp) static void i6300esb_config_write(PCIDevice *dev, uint32_t addr, uint32_t data, int len) { - I6300State *d = DO_UPCAST(I6300State, dev, dev); + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); int old; i6300esb_debug("addr = %x, data = %x, len = %d\n", addr, data, len); @@ -241,7 +245,7 @@ static void i6300esb_config_write(PCIDevice *dev, uint32_t addr, static uint32_t i6300esb_config_read(PCIDevice *dev, uint32_t addr, int len) { - I6300State *d = DO_UPCAST(I6300State, dev, dev); + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); uint32_t data; i6300esb_debug ("addr = %x, len = %d\n", addr, len); @@ -416,7 +420,7 @@ static const VMStateDescription vmstate_i6300esb = { static void i6300esb_realize(PCIDevice *dev, Error **errp) { - I6300State *d = DO_UPCAST(I6300State, dev, dev); + I6300State *d = WATCHDOG_I6300ESB_DEVICE(dev); i6300esb_debug("I6300State = %p\n", d); @@ -451,7 +455,7 @@ static void i6300esb_class_init(ObjectClass *klass, void *data) } static const TypeInfo i6300esb_info = { - .name = "i6300esb", + .name = TYPE_WATCHDOG_I6300ESB_DEVICE, .parent = TYPE_PCI_DEVICE, .instance_size = sizeof(I6300State), .class_init = i6300esb_class_init,
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor