qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 54/63] usb: Rename USB_STORAGE_DEV to USB_STORAGE


From: Eduardo Habkost
Subject: [PATCH 54/63] usb: Rename USB_STORAGE_DEV to USB_STORAGE
Date: Wed, 2 Sep 2020 18:43:02 -0400

Make the type checking macro name consistent with the TYPE_*
constant.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
---
 hw/usb/dev-storage.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c
index 648340323f..bbc5d904bf 100644
--- a/hw/usb/dev-storage.c
+++ b/hw/usb/dev-storage.c
@@ -70,7 +70,7 @@ struct MSDState {
 typedef struct MSDState MSDState;
 
 #define TYPE_USB_STORAGE "usb-storage-dev"
-DECLARE_INSTANCE_CHECKER(MSDState, USB_STORAGE_DEV,
+DECLARE_INSTANCE_CHECKER(MSDState, USB_STORAGE,
                          TYPE_USB_STORAGE)
 
 struct usb_msd_cbw {
@@ -400,7 +400,7 @@ static void usb_msd_handle_control(USBDevice *dev, 
USBPacket *p,
 
 static void usb_msd_cancel_io(USBDevice *dev, USBPacket *p)
 {
-    MSDState *s = USB_STORAGE_DEV(dev);
+    MSDState *s = USB_STORAGE(dev);
 
     assert(s->packet == p);
     s->packet = NULL;
@@ -605,7 +605,7 @@ static const struct SCSIBusInfo usb_msd_scsi_info_bot = {
 
 static void usb_msd_storage_realize(USBDevice *dev, Error **errp)
 {
-    MSDState *s = USB_STORAGE_DEV(dev);
+    MSDState *s = USB_STORAGE(dev);
     BlockBackend *blk = s->conf.blk;
     SCSIDevice *scsi_dev;
 
@@ -656,7 +656,7 @@ static void usb_msd_storage_realize(USBDevice *dev, Error 
**errp)
 
 static void usb_msd_bot_realize(USBDevice *dev, Error **errp)
 {
-    MSDState *s = USB_STORAGE_DEV(dev);
+    MSDState *s = USB_STORAGE(dev);
     DeviceState *d = DEVICE(dev);
 
     usb_desc_create_serial(dev);
@@ -725,7 +725,7 @@ static void usb_msd_get_bootindex(Object *obj, Visitor *v, 
const char *name,
                                   void *opaque, Error **errp)
 {
     USBDevice *dev = USB_DEVICE(obj);
-    MSDState *s = USB_STORAGE_DEV(dev);
+    MSDState *s = USB_STORAGE(dev);
 
     visit_type_int32(v, name, &s->conf.bootindex, errp);
 }
@@ -734,7 +734,7 @@ static void usb_msd_set_bootindex(Object *obj, Visitor *v, 
const char *name,
                                   void *opaque, Error **errp)
 {
     USBDevice *dev = USB_DEVICE(obj);
-    MSDState *s = USB_STORAGE_DEV(dev);
+    MSDState *s = USB_STORAGE(dev);
     int32_t boot_index;
     Error *local_err = NULL;
 
-- 
2.26.2




reply via email to

[Prev in Thread] Current Thread [Next in Thread]