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;
|
} CMDState;
|
||||||
|
|
||||||
typedef struct Flash {
|
typedef struct Flash {
|
||||||
SSISlave ssidev;
|
SSISlave parent_obj;
|
||||||
|
|
||||||
uint32_t r;
|
uint32_t r;
|
||||||
|
|
||||||
BlockDriverState *bdrv;
|
BlockDriverState *bdrv;
|
||||||
|
@ -545,7 +546,7 @@ static void decode_new_cmd(Flash *s, uint32_t value)
|
||||||
|
|
||||||
static int m25p80_cs(SSISlave *ss, bool select)
|
static int m25p80_cs(SSISlave *ss, bool select)
|
||||||
{
|
{
|
||||||
Flash *s = FROM_SSI_SLAVE(Flash, ss);
|
Flash *s = M25P80(ss);
|
||||||
|
|
||||||
if (select) {
|
if (select) {
|
||||||
s->len = 0;
|
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)
|
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;
|
uint32_t r = 0;
|
||||||
|
|
||||||
switch (s->state) {
|
switch (s->state) {
|
||||||
|
@ -610,7 +611,7 @@ static uint32_t m25p80_transfer8(SSISlave *ss, uint32_t tx)
|
||||||
static int m25p80_init(SSISlave *ss)
|
static int m25p80_init(SSISlave *ss)
|
||||||
{
|
{
|
||||||
DriveInfo *dinfo;
|
DriveInfo *dinfo;
|
||||||
Flash *s = FROM_SSI_SLAVE(Flash, ss);
|
Flash *s = M25P80(ss);
|
||||||
M25P80Class *mc = M25P80_GET_CLASS(s);
|
M25P80Class *mc = M25P80_GET_CLASS(s);
|
||||||
|
|
||||||
s->pi = mc->pi;
|
s->pi = mc->pi;
|
||||||
|
|
Loading…
Reference in a new issue