diff options
author | Sudeep Holla <sudeep.holla@arm.com> | 2022-04-29 14:39:45 +0300 |
---|---|---|
committer | Sudeep Holla <sudeep.holla@arm.com> | 2022-04-29 16:51:46 +0300 |
commit | 498af8d1678ae2351218337b47bbf3cb0fc16821 (patch) | |
tree | 2076a5f77eb0f6f3a3260044c3c28594b9a48e80 /include/linux/arm_ffa.h | |
parent | 00512d2930b338fdd42bd90bbd1793fe212c2d31 (diff) | |
download | linux-498af8d1678ae2351218337b47bbf3cb0fc16821.tar.xz |
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.com
Suggested-by: Arunachalam Ganapathy <arunachalam.ganapathy@arm.com>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
Diffstat (limited to 'include/linux/arm_ffa.h')
-rw-r--r-- | include/linux/arm_ffa.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/arm_ffa.h b/include/linux/arm_ffa.h index 85651e41ded8..e5c76c1ef9ed 100644 --- a/include/linux/arm_ffa.h +++ b/include/linux/arm_ffa.h @@ -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) |