Blame SOURCES/kvm-pflash-Clean-up-after-commit-368a354f02b-part-1.patch

7711c0
From 267bac031b2b6e5faf270f4af195b18820162ddb Mon Sep 17 00:00:00 2001
7711c0
From: Markus Armbruster <armbru@redhat.com>
7711c0
Date: Fri, 17 May 2019 06:51:05 +0200
7711c0
Subject: [PATCH 38/53] pflash: Clean up after commit 368a354f02b, part 1
7711c0
MIME-Version: 1.0
7711c0
Content-Type: text/plain; charset=UTF-8
7711c0
Content-Transfer-Encoding: 8bit
7711c0
7711c0
RH-Author: Markus Armbruster <armbru@redhat.com>
7711c0
Message-id: <20190517065120.12028-17-armbru@redhat.com>
7711c0
Patchwork-id: 88000
7711c0
O-Subject: [RHEL-7.7 qemu-kvm-rhev PATCH v3 16/31] pflash: Clean up after commit 368a354f02b, part 1
7711c0
Bugzilla: 1624009
7711c0
RH-Acked-by: Philippe Mathieu-Daudé <philmd@redhat.com>
7711c0
RH-Acked-by: Thomas Huth <thuth@redhat.com>
7711c0
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
7711c0
QOMification left parameter @qdev unused in pflash_cfi01_register()
7711c0
and pflash_cfi02_register().  All callers pass NULL.  Remove.
7711c0
7711c0
Signed-off-by: Markus Armbruster <armbru@redhat.com>
7711c0
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
7711c0
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
7711c0
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
7711c0
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
7711c0
Message-Id: <20190308094610.21210-15-armbru@redhat.com>
7711c0
(cherry picked from commit 940d5b132fab085bd8ec2bcfa5c1dd119785b217)
7711c0
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
7711c0
---
7711c0
 hw/arm/collie.c                          | 4 ++--
7711c0
 hw/arm/digic_boards.c                    | 2 +-
7711c0
 hw/arm/gumstix.c                         | 4 ++--
7711c0
 hw/arm/mainstone.c                       | 2 +-
7711c0
 hw/arm/musicpal.c                        | 4 ++--
7711c0
 hw/arm/omap_sx1.c                        | 4 ++--
7711c0
 hw/arm/versatilepb.c                     | 2 +-
7711c0
 hw/arm/xilinx_zynq.c                     | 2 +-
7711c0
 hw/arm/z2.c                              | 3 +--
7711c0
 hw/block/pflash_cfi01.c                  | 2 +-
7711c0
 hw/block/pflash_cfi02.c                  | 2 +-
7711c0
 hw/i386/pc_sysfw.c                       | 2 +-
7711c0
 hw/lm32/lm32_boards.c                    | 4 ++--
7711c0
 hw/lm32/milkymist.c                      | 2 +-
7711c0
 hw/microblaze/petalogix_ml605_mmu.c      | 3 +--
7711c0
 hw/microblaze/petalogix_s3adsp1800_mmu.c | 2 +-
7711c0
 hw/mips/mips_malta.c                     | 2 +-
7711c0
 hw/mips/mips_r4k.c                       | 2 +-
7711c0
 hw/ppc/ppc405_boards.c                   | 6 +++---
7711c0
 hw/ppc/sam460ex.c                        | 2 +-
7711c0
 hw/ppc/virtex_ml507.c                    | 2 +-
7711c0
 hw/sh4/r2d.c                             | 2 +-
7711c0
 include/hw/block/flash.h                 | 4 ++--
7711c0
 23 files changed, 31 insertions(+), 33 deletions(-)
7711c0
7711c0
diff --git a/hw/arm/collie.c b/hw/arm/collie.c
7711c0
index f8c566e..9cf4538 100644
7711c0
--- a/hw/arm/collie.c
7711c0
+++ b/hw/arm/collie.c
7711c0
@@ -37,12 +37,12 @@ static void collie_init(MachineState *machine)
7711c0
     s = sa1110_init(sysmem, collie_binfo.ram_size, machine->cpu_type);
7711c0
 
7711c0
     dinfo = drive_get(IF_PFLASH, 0, 0);
7711c0
-    pflash_cfi01_register(SA_CS0, NULL, "collie.fl1", 0x02000000,
7711c0
+    pflash_cfi01_register(SA_CS0, "collie.fl1", 0x02000000,
7711c0
                     dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                     (64 * 1024), 512, 4, 0x00, 0x00, 0x00, 0x00, 0);
7711c0
 
7711c0
     dinfo = drive_get(IF_PFLASH, 0, 1);
7711c0
-    pflash_cfi01_register(SA_CS1, NULL, "collie.fl2", 0x02000000,
7711c0
+    pflash_cfi01_register(SA_CS1, "collie.fl2", 0x02000000,
7711c0
                     dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                     (64 * 1024), 512, 4, 0x00, 0x00, 0x00, 0x00, 0);
7711c0
 
7711c0
diff --git a/hw/arm/digic_boards.c b/hw/arm/digic_boards.c
7711c0
index 9f11dcd..15a00a1 100644
7711c0
--- a/hw/arm/digic_boards.c
7711c0
+++ b/hw/arm/digic_boards.c
7711c0
@@ -129,7 +129,7 @@ static void digic4_add_k8p3215uqb_rom(DigicBoardState *s, hwaddr addr,
7711c0
 #define FLASH_K8P3215UQB_SIZE (4 * 1024 * 1024)
7711c0
 #define FLASH_K8P3215UQB_SECTOR_SIZE (64 * 1024)
7711c0
 
7711c0
-    pflash_cfi02_register(addr, NULL, "pflash", FLASH_K8P3215UQB_SIZE,
7711c0
+    pflash_cfi02_register(addr, "pflash", FLASH_K8P3215UQB_SIZE,
7711c0
                           NULL, FLASH_K8P3215UQB_SECTOR_SIZE,
7711c0
                           FLASH_K8P3215UQB_SIZE / FLASH_K8P3215UQB_SECTOR_SIZE,
7711c0
                           DIGIC4_ROM_MAX_SIZE / FLASH_K8P3215UQB_SIZE,
7711c0
diff --git a/hw/arm/gumstix.c b/hw/arm/gumstix.c
7711c0
index ea2a3c5..68a0376 100644
7711c0
--- a/hw/arm/gumstix.c
7711c0
+++ b/hw/arm/gumstix.c
7711c0
@@ -73,7 +73,7 @@ static void connex_init(MachineState *machine)
7711c0
 #else
7711c0
     be = 0;
7711c0
 #endif
7711c0
-    if (!pflash_cfi01_register(0x00000000, NULL, "connext.rom", connex_rom,
7711c0
+    if (!pflash_cfi01_register(0x00000000, "connext.rom", connex_rom,
7711c0
                                dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                                sector_len, connex_rom / sector_len,
7711c0
                                2, 0, 0, 0, 0, be)) {
7711c0
@@ -110,7 +110,7 @@ static void verdex_init(MachineState *machine)
7711c0
 #else
7711c0
     be = 0;
7711c0
 #endif
7711c0
-    if (!pflash_cfi01_register(0x00000000, NULL, "verdex.rom", verdex_rom,
7711c0
+    if (!pflash_cfi01_register(0x00000000, "verdex.rom", verdex_rom,
7711c0
                                dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                                sector_len, verdex_rom / sector_len,
7711c0
                                2, 0, 0, 0, 0, be)) {
7711c0
diff --git a/hw/arm/mainstone.c b/hw/arm/mainstone.c
7711c0
index 4215c02..cb1116b 100644
7711c0
--- a/hw/arm/mainstone.c
7711c0
+++ b/hw/arm/mainstone.c
7711c0
@@ -149,7 +149,7 @@ static void mainstone_common_init(MemoryRegion *address_space_mem,
7711c0
             exit(1);
7711c0
         }
7711c0
 
7711c0
-        if (!pflash_cfi01_register(mainstone_flash_base[i], NULL,
7711c0
+        if (!pflash_cfi01_register(mainstone_flash_base[i],
7711c0
                                    i ? "mainstone.flash1" : "mainstone.flash0",
7711c0
                                    MAINSTONE_FLASH,
7711c0
                                    blk_by_legacy_dinfo(dinfo),
7711c0
diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c
7711c0
index 38d7322..fd7a7a9 100644
7711c0
--- a/hw/arm/musicpal.c
7711c0
+++ b/hw/arm/musicpal.c
7711c0
@@ -1637,14 +1637,14 @@ static void musicpal_init(MachineState *machine)
7711c0
          * image is smaller than 32 MB.
7711c0
          */
7711c0
 #ifdef TARGET_WORDS_BIGENDIAN
7711c0
-        pflash_cfi02_register(0x100000000ULL-MP_FLASH_SIZE_MAX, NULL,
7711c0
+        pflash_cfi02_register(0x100000000ULL - MP_FLASH_SIZE_MAX,
7711c0
                               "musicpal.flash", flash_size,
7711c0
                               blk, 0x10000, (flash_size + 0xffff) >> 16,
7711c0
                               MP_FLASH_SIZE_MAX / flash_size,
7711c0
                               2, 0x00BF, 0x236D, 0x0000, 0x0000,
7711c0
                               0x5555, 0x2AAA, 1);
7711c0
 #else
7711c0
-        pflash_cfi02_register(0x100000000ULL-MP_FLASH_SIZE_MAX, NULL,
7711c0
+        pflash_cfi02_register(0x100000000ULL - MP_FLASH_SIZE_MAX,
7711c0
                               "musicpal.flash", flash_size,
7711c0
                               blk, 0x10000, (flash_size + 0xffff) >> 16,
7711c0
                               MP_FLASH_SIZE_MAX / flash_size,
7711c0
diff --git a/hw/arm/omap_sx1.c b/hw/arm/omap_sx1.c
7711c0
index eccc19c..a7a3e7d 100644
7711c0
--- a/hw/arm/omap_sx1.c
7711c0
+++ b/hw/arm/omap_sx1.c
7711c0
@@ -153,7 +153,7 @@ static void sx1_init(MachineState *machine, const int version)
7711c0
 #endif
7711c0
 
7711c0
     if ((dinfo = drive_get(IF_PFLASH, 0, fl_idx)) != NULL) {
7711c0
-        if (!pflash_cfi01_register(OMAP_CS0_BASE, NULL,
7711c0
+        if (!pflash_cfi01_register(OMAP_CS0_BASE,
7711c0
                                    "omap_sx1.flash0-1", flash_size,
7711c0
                                    blk_by_legacy_dinfo(dinfo),
7711c0
                                    sector_size, flash_size / sector_size,
7711c0
@@ -177,7 +177,7 @@ static void sx1_init(MachineState *machine, const int version)
7711c0
         memory_region_add_subregion(address_space,
7711c0
                                 OMAP_CS1_BASE + flash1_size, &cs[1]);
7711c0
 
7711c0
-        if (!pflash_cfi01_register(OMAP_CS1_BASE, NULL,
7711c0
+        if (!pflash_cfi01_register(OMAP_CS1_BASE,
7711c0
                                    "omap_sx1.flash1-1", flash1_size,
7711c0
                                    blk_by_legacy_dinfo(dinfo),
7711c0
                                    sector_size, flash1_size / sector_size,
7711c0
diff --git a/hw/arm/versatilepb.c b/hw/arm/versatilepb.c
7711c0
index 418792c..99d8ff9 100644
7711c0
--- a/hw/arm/versatilepb.c
7711c0
+++ b/hw/arm/versatilepb.c
7711c0
@@ -358,7 +358,7 @@ static void versatile_init(MachineState *machine, int board_id)
7711c0
     /* 0x34000000 NOR Flash */
7711c0
 
7711c0
     dinfo = drive_get(IF_PFLASH, 0, 0);
7711c0
-    if (!pflash_cfi01_register(VERSATILE_FLASH_ADDR, NULL, "versatile.flash",
7711c0
+    if (!pflash_cfi01_register(VERSATILE_FLASH_ADDR, "versatile.flash",
7711c0
                           VERSATILE_FLASH_SIZE,
7711c0
                           dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                           VERSATILE_FLASH_SECT_SIZE,
7711c0
diff --git a/hw/arm/xilinx_zynq.c b/hw/arm/xilinx_zynq.c
7711c0
index 0f76333..4a05e1c 100644
7711c0
--- a/hw/arm/xilinx_zynq.c
7711c0
+++ b/hw/arm/xilinx_zynq.c
7711c0
@@ -206,7 +206,7 @@ static void zynq_init(MachineState *machine)
7711c0
     DriveInfo *dinfo = drive_get(IF_PFLASH, 0, 0);
7711c0
 
7711c0
     /* AMD */
7711c0
-    pflash_cfi02_register(0xe2000000, NULL, "zynq.pflash", FLASH_SIZE,
7711c0
+    pflash_cfi02_register(0xe2000000, "zynq.pflash", FLASH_SIZE,
7711c0
                           dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                           FLASH_SECTOR_SIZE,
7711c0
                           FLASH_SIZE/FLASH_SECTOR_SIZE, 1,
7711c0
diff --git a/hw/arm/z2.c b/hw/arm/z2.c
7711c0
index 730a539..f5f1903 100644
7711c0
--- a/hw/arm/z2.c
7711c0
+++ b/hw/arm/z2.c
7711c0
@@ -325,8 +325,7 @@ static void z2_init(MachineState *machine)
7711c0
         exit(1);
7711c0
     }
7711c0
 
7711c0
-    if (!pflash_cfi01_register(Z2_FLASH_BASE,
7711c0
-                               NULL, "z2.flash0", Z2_FLASH_SIZE,
7711c0
+    if (!pflash_cfi01_register(Z2_FLASH_BASE, "z2.flash0", Z2_FLASH_SIZE,
7711c0
                                dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                                sector_len, Z2_FLASH_SIZE / sector_len,
7711c0
                                4, 0, 0, 0, 0, be)) {
7711c0
diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c
7711c0
index dbd3b9d..31926e2 100644
7711c0
--- a/hw/block/pflash_cfi01.c
7711c0
+++ b/hw/block/pflash_cfi01.c
7711c0
@@ -950,7 +950,7 @@ static void pflash_cfi01_register_types(void)
7711c0
 type_init(pflash_cfi01_register_types)
7711c0
 
7711c0
 PFlashCFI01 *pflash_cfi01_register(hwaddr base,
7711c0
-                                   DeviceState *qdev, const char *name,
7711c0
+                                   const char *name,
7711c0
                                    hwaddr size,
7711c0
                                    BlockBackend *blk,
7711c0
                                    uint32_t sector_len, int nb_blocs,
7711c0
diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c
7711c0
index b9e0448..8c6c6e1 100644
7711c0
--- a/hw/block/pflash_cfi02.c
7711c0
+++ b/hw/block/pflash_cfi02.c
7711c0
@@ -786,7 +786,7 @@ static void pflash_cfi02_register_types(void)
7711c0
 type_init(pflash_cfi02_register_types)
7711c0
 
7711c0
 PFlashCFI02 *pflash_cfi02_register(hwaddr base,
7711c0
-                                   DeviceState *qdev, const char *name,
7711c0
+                                   const char *name,
7711c0
                                    hwaddr size,
7711c0
                                    BlockBackend *blk,
7711c0
                                    uint32_t sector_len, int nb_blocs,
7711c0
diff --git a/hw/i386/pc_sysfw.c b/hw/i386/pc_sysfw.c
7711c0
index d8a98f3..721a867 100644
7711c0
--- a/hw/i386/pc_sysfw.c
7711c0
+++ b/hw/i386/pc_sysfw.c
7711c0
@@ -159,7 +159,7 @@ static void pc_system_flash_init(MemoryRegion *rom_memory)
7711c0
 
7711c0
         /* pflash_cfi01_register() creates a deep copy of the name */
7711c0
         snprintf(name, sizeof name, "system.flash%d", unit);
7711c0
-        system_flash = pflash_cfi01_register(phys_addr, NULL /* qdev */, name,
7711c0
+        system_flash = pflash_cfi01_register(phys_addr, name,
7711c0
                                              size, blk, sector_size,
7711c0
                                              size >> sector_bits,
7711c0
                                              1      /* width */,
7711c0
diff --git a/hw/lm32/lm32_boards.c b/hw/lm32/lm32_boards.c
7711c0
index 527bcc2..0a1b6e9 100644
7711c0
--- a/hw/lm32/lm32_boards.c
7711c0
+++ b/hw/lm32/lm32_boards.c
7711c0
@@ -114,7 +114,7 @@ static void lm32_evr_init(MachineState *machine)
7711c0
 
7711c0
     dinfo = drive_get(IF_PFLASH, 0, 0);
7711c0
     /* Spansion S29NS128P */
7711c0
-    pflash_cfi02_register(flash_base, NULL, "lm32_evr.flash", flash_size,
7711c0
+    pflash_cfi02_register(flash_base, "lm32_evr.flash", flash_size,
7711c0
                           dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                           flash_sector_size, flash_size / flash_sector_size,
7711c0
                           1, 2, 0x01, 0x7e, 0x43, 0x00, 0x555, 0x2aa, 1);
7711c0
@@ -206,7 +206,7 @@ static void lm32_uclinux_init(MachineState *machine)
7711c0
 
7711c0
     dinfo = drive_get(IF_PFLASH, 0, 0);
7711c0
     /* Spansion S29NS128P */
7711c0
-    pflash_cfi02_register(flash_base, NULL, "lm32_uclinux.flash", flash_size,
7711c0
+    pflash_cfi02_register(flash_base, "lm32_uclinux.flash", flash_size,
7711c0
                           dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                           flash_sector_size, flash_size / flash_sector_size,
7711c0
                           1, 2, 0x01, 0x7e, 0x43, 0x00, 0x555, 0x2aa, 1);
7711c0
diff --git a/hw/lm32/milkymist.c b/hw/lm32/milkymist.c
7711c0
index 85d64fe..3e38313 100644
7711c0
--- a/hw/lm32/milkymist.c
7711c0
+++ b/hw/lm32/milkymist.c
7711c0
@@ -121,7 +121,7 @@ milkymist_init(MachineState *machine)
7711c0
 
7711c0
     dinfo = drive_get(IF_PFLASH, 0, 0);
7711c0
     /* Numonyx JS28F256J3F105 */
7711c0
-    pflash_cfi01_register(flash_base, NULL, "milkymist.flash", flash_size,
7711c0
+    pflash_cfi01_register(flash_base, "milkymist.flash", flash_size,
7711c0
                           dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                           flash_sector_size, flash_size / flash_sector_size,
7711c0
                           2, 0x00, 0x89, 0x00, 0x1d, 1);
7711c0
diff --git a/hw/microblaze/petalogix_ml605_mmu.c b/hw/microblaze/petalogix_ml605_mmu.c
7711c0
index b664dc0..a2bc9fc 100644
7711c0
--- a/hw/microblaze/petalogix_ml605_mmu.c
7711c0
+++ b/hw/microblaze/petalogix_ml605_mmu.c
7711c0
@@ -107,8 +107,7 @@ petalogix_ml605_init(MachineState *machine)
7711c0
     dinfo = drive_get(IF_PFLASH, 0, 0);
7711c0
     /* 5th parameter 2 means bank-width
7711c0
      * 10th paremeter 0 means little-endian */
7711c0
-    pflash_cfi01_register(FLASH_BASEADDR,
7711c0
-                          NULL, "petalogix_ml605.flash", FLASH_SIZE,
7711c0
+    pflash_cfi01_register(FLASH_BASEADDR, "petalogix_ml605.flash", FLASH_SIZE,
7711c0
                           dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                           (64 * 1024), FLASH_SIZE >> 16,
7711c0
                           2, 0x89, 0x18, 0x0000, 0x0, 0);
7711c0
diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c
7711c0
index 5cb4deb..37090c5 100644
7711c0
--- a/hw/microblaze/petalogix_s3adsp1800_mmu.c
7711c0
+++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c
7711c0
@@ -86,7 +86,7 @@ petalogix_s3adsp1800_init(MachineState *machine)
7711c0
 
7711c0
     dinfo = drive_get(IF_PFLASH, 0, 0);
7711c0
     pflash_cfi01_register(FLASH_BASEADDR,
7711c0
-                          NULL, "petalogix_s3adsp1800.flash", FLASH_SIZE,
7711c0
+                          "petalogix_s3adsp1800.flash", FLASH_SIZE,
7711c0
                           dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                           (64 * 1024), FLASH_SIZE >> 16,
7711c0
                           1, 0x89, 0x18, 0x0000, 0x0, 1);
7711c0
diff --git a/hw/mips/mips_malta.c b/hw/mips/mips_malta.c
7711c0
index e46a252..6b09258 100644
7711c0
--- a/hw/mips/mips_malta.c
7711c0
+++ b/hw/mips/mips_malta.c
7711c0
@@ -1062,7 +1062,7 @@ void mips_malta_init(MachineState *machine)
7711c0
 
7711c0
     /* Load firmware in flash / BIOS. */
7711c0
     dinfo = drive_get(IF_PFLASH, 0, fl_idx);
7711c0
-    fl = pflash_cfi01_register(FLASH_ADDRESS, NULL, "mips_malta.bios",
7711c0
+    fl = pflash_cfi01_register(FLASH_ADDRESS, "mips_malta.bios",
7711c0
                                FLASH_SIZE,
7711c0
                                dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                                65536, FLASH_SIZE >> 16,
7711c0
diff --git a/hw/mips/mips_r4k.c b/hw/mips/mips_r4k.c
7711c0
index aeadc4a..4ac5471 100644
7711c0
--- a/hw/mips/mips_r4k.c
7711c0
+++ b/hw/mips/mips_r4k.c
7711c0
@@ -234,7 +234,7 @@ void mips_r4k_init(MachineState *machine)
7711c0
         load_image_targphys(filename, 0x1fc00000, BIOS_SIZE);
7711c0
     } else if ((dinfo = drive_get(IF_PFLASH, 0, 0)) != NULL) {
7711c0
         uint32_t mips_rom = 0x00400000;
7711c0
-        if (!pflash_cfi01_register(0x1fc00000, NULL, "mips_r4k.bios", mips_rom,
7711c0
+        if (!pflash_cfi01_register(0x1fc00000, "mips_r4k.bios", mips_rom,
7711c0
                                    blk_by_legacy_dinfo(dinfo),
7711c0
                                    sector_len, mips_rom / sector_len,
7711c0
                                    4, 0, 0, 0, 0, be)) {
7711c0
diff --git a/hw/ppc/ppc405_boards.c b/hw/ppc/ppc405_boards.c
7711c0
index bf32672..d2ad8cd 100644
7711c0
--- a/hw/ppc/ppc405_boards.c
7711c0
+++ b/hw/ppc/ppc405_boards.c
7711c0
@@ -229,7 +229,7 @@ static void ref405ep_init(MachineState *machine)
7711c0
     if (dinfo) {
7711c0
         bios_size = 8 * MiB;
7711c0
         pflash_cfi02_register((uint32_t)(-bios_size),
7711c0
-                              NULL, "ef405ep.bios", bios_size,
7711c0
+                              "ef405ep.bios", bios_size,
7711c0
                               dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                               64 * KiB, bios_size / (64 * KiB), 1,
7711c0
                               2, 0x0001, 0x22DA, 0x0000, 0x0000, 0x555, 0x2AA,
7711c0
@@ -500,7 +500,7 @@ static void taihu_405ep_init(MachineState *machine)
7711c0
     if (dinfo) {
7711c0
         bios_size = 2 * MiB;
7711c0
         pflash_cfi02_register(0xFFE00000,
7711c0
-                              NULL, "taihu_405ep.bios", bios_size,
7711c0
+                              "taihu_405ep.bios", bios_size,
7711c0
                               dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                               64 * KiB, bios_size / (64 * KiB), 1,
7711c0
                               4, 0x0001, 0x22DA, 0x0000, 0x0000, 0x555, 0x2AA,
7711c0
@@ -534,7 +534,7 @@ static void taihu_405ep_init(MachineState *machine)
7711c0
     dinfo = drive_get(IF_PFLASH, 0, fl_idx);
7711c0
     if (dinfo) {
7711c0
         bios_size = 32 * MiB;
7711c0
-        pflash_cfi02_register(0xfc000000, NULL, "taihu_405ep.flash", bios_size,
7711c0
+        pflash_cfi02_register(0xfc000000, "taihu_405ep.flash", bios_size,
7711c0
                               dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                               64 * KiB, bios_size / (64 * KiB), 1,
7711c0
                               4, 0x0001, 0x22DA, 0x0000, 0x0000, 0x555, 0x2AA,
7711c0
diff --git a/hw/ppc/sam460ex.c b/hw/ppc/sam460ex.c
7711c0
index 83c6e90..0c1790f 100644
7711c0
--- a/hw/ppc/sam460ex.c
7711c0
+++ b/hw/ppc/sam460ex.c
7711c0
@@ -234,7 +234,7 @@ static int sam460ex_load_uboot(void)
7711c0
 
7711c0
     dinfo = drive_get(IF_PFLASH, 0, 0);
7711c0
     if (!pflash_cfi01_register(FLASH_BASE | ((hwaddr)FLASH_BASE_H << 32),
7711c0
-                               NULL, "sam460ex.flash", FLASH_SIZE,
7711c0
+                               "sam460ex.flash", FLASH_SIZE,
7711c0
                                dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                                64 * KiB, FLASH_SIZE / (64 * KiB),
7711c0
                                1, 0x89, 0x18, 0x0000, 0x0, 1)) {
7711c0
diff --git a/hw/ppc/virtex_ml507.c b/hw/ppc/virtex_ml507.c
7711c0
index 77a1778..66fa766 100644
7711c0
--- a/hw/ppc/virtex_ml507.c
7711c0
+++ b/hw/ppc/virtex_ml507.c
7711c0
@@ -235,7 +235,7 @@ static void virtex_init(MachineState *machine)
7711c0
     memory_region_add_subregion(address_space_mem, ram_base, phys_ram);
7711c0
 
7711c0
     dinfo = drive_get(IF_PFLASH, 0, 0);
7711c0
-    pflash_cfi01_register(PFLASH_BASEADDR, NULL, "virtex.flash", FLASH_SIZE,
7711c0
+    pflash_cfi01_register(PFLASH_BASEADDR, "virtex.flash", FLASH_SIZE,
7711c0
                           dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                           (64 * 1024), FLASH_SIZE >> 16,
7711c0
                           1, 0x89, 0x18, 0x0000, 0x0, 1);
7711c0
diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c
7711c0
index befb582..7016d6f 100644
7711c0
--- a/hw/sh4/r2d.c
7711c0
+++ b/hw/sh4/r2d.c
7711c0
@@ -298,7 +298,7 @@ static void r2d_init(MachineState *machine)
7711c0
      * addressable in words of 16bit.
7711c0
      */
7711c0
     dinfo = drive_get(IF_PFLASH, 0, 0);
7711c0
-    pflash_cfi02_register(0x0, NULL, "r2d.flash", FLASH_SIZE,
7711c0
+    pflash_cfi02_register(0x0, "r2d.flash", FLASH_SIZE,
7711c0
                           dinfo ? blk_by_legacy_dinfo(dinfo) : NULL,
7711c0
                           64 * KiB, FLASH_SIZE >> 16,
7711c0
                           1, 2, 0x0001, 0x227e, 0x2220, 0x2200,
7711c0
diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h
7711c0
index aeea3ca..3e48901 100644
7711c0
--- a/include/hw/block/flash.h
7711c0
+++ b/include/hw/block/flash.h
7711c0
@@ -14,7 +14,7 @@
7711c0
 typedef struct PFlashCFI01 PFlashCFI01;
7711c0
 
7711c0
 PFlashCFI01 *pflash_cfi01_register(hwaddr base,
7711c0
-                                   DeviceState *qdev, const char *name,
7711c0
+                                   const char *name,
7711c0
                                    hwaddr size,
7711c0
                                    BlockBackend *blk,
7711c0
                                    uint32_t sector_len, int nb_blocs,
7711c0
@@ -33,7 +33,7 @@ MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl);
7711c0
 typedef struct PFlashCFI02 PFlashCFI02;
7711c0
 
7711c0
 PFlashCFI02 *pflash_cfi02_register(hwaddr base,
7711c0
-                                   DeviceState *qdev, const char *name,
7711c0
+                                   const char *name,
7711c0
                                    hwaddr size,
7711c0
                                    BlockBackend *blk,
7711c0
                                    uint32_t sector_len, int nb_blocs,
7711c0
-- 
7711c0
1.8.3.1
7711c0