rc = -ENOMEM;
goto post_drvdata_err;
}
- dev_set_drvdata(dev, new_drvdata);
+ platform_set_drvdata(plat_dev, new_drvdata);
new_drvdata->plat_dev = plat_dev;
new_drvdata->clk = of_clk_get(np, 0);
cc_clk_off(new_drvdata);
post_drvdata_err:
dev_err(dev, "ccree init error occurred!\n");
- dev_set_drvdata(dev, NULL);
return rc;
}
static void cleanup_cc_resources(struct platform_device *plat_dev)
{
struct ssi_drvdata *drvdata =
- (struct ssi_drvdata *)dev_get_drvdata(&plat_dev->dev);
+ (struct ssi_drvdata *)platform_get_drvdata(plat_dev);
ssi_aead_free(drvdata);
ssi_hash_free(drvdata);
#endif
fini_cc_regs(drvdata);
cc_clk_off(drvdata);
- dev_set_drvdata(&plat_dev->dev, NULL);
}
int cc_clk_on(struct ssi_drvdata *drvdata)