qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: Alexander Graf <agraf@suse.de>,
	Scott Wood <scottwood@freescale.com>,
	qemu-ppc@nongnu.org, Fabien Chouteau <chouteau@adacore.com>,
	Jason Wang <jasowang@redhat.com>
Subject: [Qemu-devel] [PATCH for-2.10 2/2] etsec: Use TYPE_ETSEC macro when registering/creating device
Date: Fri, 31 Mar 2017 16:27:24 -0300	[thread overview]
Message-ID: <20170331192724.14339-3-ehabkost@redhat.com> (raw)
In-Reply-To: <20170331192724.14339-1-ehabkost@redhat.com>

Instead of hardcoding the class name, use the TYPE_ETSEC macro
when registering the class and creating devices.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/net/fsl_etsec/etsec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/net/fsl_etsec/etsec.c b/hw/net/fsl_etsec/etsec.c
index ddefaf560c..5d2c45de6f 100644
--- a/hw/net/fsl_etsec/etsec.c
+++ b/hw/net/fsl_etsec/etsec.c
@@ -419,7 +419,7 @@ static void etsec_class_init(ObjectClass *klass, void *data)
 }
 
 static TypeInfo etsec_info = {
-    .name                  = "eTSEC",
+    .name                  = TYPE_ETSEC,
     .parent                = TYPE_SYS_BUS_DEVICE,
     .instance_size         = sizeof(eTSEC),
     .class_init            = etsec_class_init,
@@ -442,7 +442,7 @@ DeviceState *etsec_create(hwaddr         base,
 {
     DeviceState *dev;
 
-    dev = qdev_create(NULL, "eTSEC");
+    dev = qdev_create(NULL, TYPE_ETSEC);
     qdev_set_nic_properties(dev, nd);
     qdev_init_nofail(dev);
 
-- 
2.11.0.259.g40922b1

  parent reply	other threads:[~2017-03-31 19:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-31 19:27 [Qemu-devel] [PATCH for-2.10 0/2] etsec: (TYPE_)ETSEC_COMMON macro cleanup Eduardo Habkost
2017-03-31 19:27 ` [Qemu-devel] [PATCH for-2.10 1/2] etsec: Rename (TYPE_)ETSEC_COMMON to (TYPE_)ETSEC Eduardo Habkost
2017-03-31 19:27 ` Eduardo Habkost [this message]
2017-04-02 12:42 ` [Qemu-devel] [PATCH for-2.10 0/2] etsec: (TYPE_)ETSEC_COMMON macro cleanup Philippe Mathieu-Daudé
2017-04-03  9:48   ` Fabien Chouteau

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170331192724.14339-3-ehabkost@redhat.com \
    --to=ehabkost@redhat.com \
    --cc=agraf@suse.de \
    --cc=chouteau@adacore.com \
    --cc=jasowang@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).