mirror of
https://github.com/qemu/qemu.git
synced 2024-11-30 07:13:38 +08:00
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>
This commit is contained in:
parent
1f760d5f2b
commit
cdccf7d7e7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user