From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34970) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2YLv-0008Ji-75 for qemu-devel@nongnu.org; Thu, 25 Jul 2013 23:06:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V2YLt-00085D-SK for qemu-devel@nongnu.org; Thu, 25 Jul 2013 23:05:59 -0400 Received: from mail-pb0-x22a.google.com ([2607:f8b0:400e:c01::22a]:36873) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V2YLt-000851-Mb for qemu-devel@nongnu.org; Thu, 25 Jul 2013 23:05:57 -0400 Received: by mail-pb0-f42.google.com with SMTP id un1so1516281pbc.15 for ; Thu, 25 Jul 2013 20:05:57 -0700 (PDT) Date: Fri, 26 Jul 2013 05:05:33 +0200 From: "Edgar E. Iglesias" Message-ID: <20130726030533.GG25811@smtp.vpn> References: <1374702140-13771-1-git-send-email-afaerber@suse.de> <1374702140-13771-15-git-send-email-afaerber@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1374702140-13771-15-git-send-email-afaerber@suse.de> Subject: Re: [Qemu-devel] [PATCH qom-next for-1.6 14/14] xilinx_uartlite: QOM'ify List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Andreas =?iso-8859-1?Q?F=E4rber?= Cc: Peter Crosthwaite , qemu-devel@nongnu.org On Wed, Jul 24, 2013 at 11:42:19PM +0200, Andreas Färber wrote: > Signed-off-by: Andreas Färber Acked-by: Edgar E. Iglesias > --- > hw/char/xilinx_uartlite.c | 11 ++++++++--- > 1 file changed, 8 insertions(+), 3 deletions(-) > > diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c > index 929743c..b0d1d04 100644 > --- a/hw/char/xilinx_uartlite.c > +++ b/hw/char/xilinx_uartlite.c > @@ -46,8 +46,13 @@ > #define CONTROL_RST_RX 0x02 > #define CONTROL_IE 0x10 > > +#define TYPE_XILINX_UARTLITE "xlnx.xps-uartlite" > +#define XILINX_UARTLITE(obj) \ > + OBJECT_CHECK(XilinxUARTLite, (obj), TYPE_XILINX_UARTLITE) > + > typedef struct XilinxUARTLite { > - SysBusDevice busdev; > + SysBusDevice parent_obj; > + > MemoryRegion mmio; > CharDriverState *chr; > qemu_irq irq; > @@ -193,7 +198,7 @@ static void uart_event(void *opaque, int event) > > static int xilinx_uartlite_init(SysBusDevice *dev) > { > - XilinxUARTLite *s = FROM_SYSBUS(typeof (*s), dev); > + XilinxUARTLite *s = XILINX_UARTLITE(dev); > > sysbus_init_irq(dev, &s->irq); > > @@ -216,7 +221,7 @@ static void xilinx_uartlite_class_init(ObjectClass *klass, void *data) > } > > static const TypeInfo xilinx_uartlite_info = { > - .name = "xlnx.xps-uartlite", > + .name = TYPE_XILINX_UARTLITE, > .parent = TYPE_SYS_BUS_DEVICE, > .instance_size = sizeof(XilinxUARTLite), > .class_init = xilinx_uartlite_class_init, > -- > 1.8.1.4 >