From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:42898) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h0taQ-0001ZR-QE for qemu-devel@nongnu.org; Mon, 04 Mar 2019 14:49:19 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h0taQ-0000RL-2q for qemu-devel@nongnu.org; Mon, 04 Mar 2019 14:49:18 -0500 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Mon, 4 Mar 2019 20:48:54 +0100 Message-Id: <20190304194857.9780-2-philmd@redhat.com> In-Reply-To: <20190304194857.9780-1-philmd@redhat.com> References: <20190304194857.9780-1-philmd@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PATCH 1/4] pflash_cfi01: Add pflash_cfi01_get_blk() helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, Markus Armbruster Cc: Laszlo Ersek , qemu-block@nongnu.org, Kevin Wolf , Paolo Bonzini , Max Reitz , "Michael S. Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Add an helper to access the opaque struct PFlashCFI01. Signed-off-by: Markus Armbruster [PMD: Extracted from bigger patch] Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/block/pflash_cfi01.c | 5 +++++ include/hw/block/flash.h | 1 + 2 files changed, 6 insertions(+) diff --git a/hw/block/pflash_cfi01.c b/hw/block/pflash_cfi01.c index 9d1c356eb6..9ecab693e8 100644 --- a/hw/block/pflash_cfi01.c +++ b/hw/block/pflash_cfi01.c @@ -972,6 +972,11 @@ MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *f= l) return &fl->mem; } =20 +BlockBackend *pflash_cfi01_get_blk(PFlashCFI01 *fl) +{ + return fl->blk; +} + static void postload_update_cb(void *opaque, int running, RunState state= ) { PFlashCFI01 *pfl =3D opaque; diff --git a/include/hw/block/flash.h b/include/hw/block/flash.h index 914932eaec..a0f488732a 100644 --- a/include/hw/block/flash.h +++ b/include/hw/block/flash.h @@ -22,6 +22,7 @@ PFlashCFI01 *pflash_cfi01_register(hwaddr base, uint16_t id0, uint16_t id1, uint16_t id2, uint16_t id3, int be); +BlockBackend *pflash_cfi01_get_blk(PFlashCFI01 *fl); MemoryRegion *pflash_cfi01_get_memory(PFlashCFI01 *fl); =20 /* pflash_cfi02.c */ --=20 2.20.1