aboutsummaryrefslogtreecommitdiff
path: root/hw/block/m25p80.c
diff options
context:
space:
mode:
authorPeter Crosthwaite <peter.crosthwaite@xilinx.com>2014-02-11 16:30:45 -0800
committerAndreas Färber <afaerber@suse.de>2014-03-12 20:13:02 +0100
commitcdccf7d7e7f16046cdb192423323a42ad7f43bec (patch)
tree509571bfb6ec50c23fa6e808cfb32bb265b4a327 /hw/block/m25p80.c
parent1f760d5f2bbe89685f2fe4b12a898c26196d3a1e (diff)
downloadqemu-cdccf7d7e7f16046cdb192423323a42ad7f43bec.zip
qemu-cdccf7d7e7f16046cdb192423323a42ad7f43bec.tar.gz
qemu-cdccf7d7e7f16046cdb192423323a42ad7f43bec.tar.bz2
block/m25p80: Remove FROM_SSI_SLAVE() usages
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> [AF: Rename parent field] Signed-off-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'hw/block/m25p80.c')
-rw-r--r--hw/block/m25p80.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c
index 02a1544..e29a738 100644
--- a/hw/block/m25p80.c
+++ b/hw/block/m25p80.c
@@ -241,7 +241,8 @@ typedef enum {
} CMDState;
typedef struct Flash {
- SSISlave ssidev;
+ SSISlave parent_obj;
+
uint32_t r;
BlockDriverState *bdrv;
@@ -545,7 +546,7 @@ static void decode_new_cmd(Flash *s, uint32_t value)
static int m25p80_cs(SSISlave *ss, bool select)
{
- Flash *s = FROM_SSI_SLAVE(Flash, ss);
+ Flash *s = M25P80(ss);
if (select) {
s->len = 0;
@@ -561,7 +562,7 @@ static int m25p80_cs(SSISlave *ss, bool select)
static uint32_t m25p80_transfer8(SSISlave *ss, uint32_t tx)
{
- Flash *s = FROM_SSI_SLAVE(Flash, ss);
+ Flash *s = M25P80(ss);
uint32_t r = 0;
switch (s->state) {
@@ -610,7 +611,7 @@ static uint32_t m25p80_transfer8(SSISlave *ss, uint32_t tx)
static int m25p80_init(SSISlave *ss)
{
DriveInfo *dinfo;
- Flash *s = FROM_SSI_SLAVE(Flash, ss);
+ Flash *s = M25P80(ss);
M25P80Class *mc = M25P80_GET_CLASS(s);
s->pi = mc->pi;