@@ -409,20 +409,19 @@ static void ism_create_system_eid(void)
memcpy(&SYSTEM_EID.type, tmp, 4);
}
-static void ism_get_system_eid(struct smcd_dev *smcd, u8 **eid)
+static u8 *ism_get_system_eid(void)
{
- *eid = &SYSTEM_EID.seid_string[0];
+ return SYSTEM_EID.seid_string;
}
static u16 ism_get_chid(struct smcd_dev *smcd)
{
- struct ism_dev *ismdev;
+ struct ism_dev *ism = (struct ism_dev *)smcd->priv;
- ismdev = (struct ism_dev *)smcd->priv;
- if (!ismdev || !ismdev->pdev)
+ if (!ism || !ism->pdev)
return 0;
- return to_zpci(ismdev->pdev)->pchid;
+ return to_zpci(ism->pdev)->pchid;
}
static void ism_handle_event(struct ism_dev *ism)
@@ -72,7 +72,7 @@ struct smcd_ops {
int (*move_data)(struct smcd_dev *dev, u64 dmb_tok, unsigned int idx,
bool sf, unsigned int offset, void *data,
unsigned int size);
- void (*get_system_eid)(struct smcd_dev *dev, u8 **eid);
+ u8* (*get_system_eid)(void);
u16 (*get_chid)(struct smcd_dev *dev);
};
@@ -429,7 +429,7 @@ int smcd_register_dev(struct smcd_dev *smcd)
if (list_empty(&smcd_dev_list.list)) {
u8 *system_eid = NULL;
- smcd->ops->get_system_eid(smcd, &system_eid);
+ system_eid = smcd->ops->get_system_eid();
if (system_eid[24] != '0' || system_eid[28] != '0') {
smc_ism_v2_capable = true;
memcpy(smc_ism_v2_system_eid, system_eid,