Commit 498af8d1 authored by Sudeep Holla's avatar Sudeep Holla

firmware: arm_ffa: Add ffa_dev_get_drvdata helper function

Add a helper function to fetch ffa_dev's driver_data using
dev_get_drvdata. At the same time move existing ffa_dev_set_drvdata
to use dev_set_drvdata.

Link: https://lore.kernel.org/r/20220429113946.2087145-3-sudeep.holla@arm.comSuggested-by: default avatarArunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Signed-off-by: default avatarSudeep Holla <sudeep.holla@arm.com>
parent 00512d29
......@@ -38,7 +38,12 @@ struct ffa_driver {
static inline void ffa_dev_set_drvdata(struct ffa_device *fdev, void *data)
{
fdev->dev.driver_data = data;
dev_set_drvdata(&fdev->dev, data);
}
static inline void *ffa_dev_get_drvdata(struct ffa_device *fdev)
{
return dev_get_drvdata(&fdev->dev);
}
#if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment