s390/sclp: move sclp_execute related functions into the SCLP class

Let's move the sclp_execute related functions into the SCLP class
and pass the device state as parameter, so we have easy access to
the SCLPDevice later on.

Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
This commit is contained in:
David Hildenbrand 2015-05-27 10:04:56 +02:00 committed by Cornelia Huck
parent 515190d9da
commit 25a3c5af57
2 changed files with 45 additions and 17 deletions

View file

@ -181,8 +181,17 @@ typedef struct SCLPDevice {
typedef struct SCLPDeviceClass {
/* private */
DeviceClass parent_class;
void (*read_SCP_info)(SCLPDevice *sclp, SCCB *sccb);
void (*read_storage_element0_info)(SCLPDevice *sclp, SCCB *sccb);
void (*read_storage_element1_info)(SCLPDevice *sclp, SCCB *sccb);
void (*attach_storage_element)(SCLPDevice *sclp, SCCB *sccb,
uint16_t element);
void (*assign_storage)(SCLPDevice *sclp, SCCB *sccb);
void (*unassign_storage)(SCLPDevice *sclp, SCCB *sccb);
void (*read_cpu_info)(SCLPDevice *sclp, SCCB *sccb);
/* public */
void (*execute)(SCLPDevice *sclp, SCCB *sccb, uint32_t code);
} SCLPDeviceClass;
typedef struct sclpMemoryHotplugDev sclpMemoryHotplugDev;