Skip to content

Commit 7aa7a97

Browse files
committed
firmware: arm_ffa: Rename ffa_dev_ops as ffa_ops
Except the message APIs, all other APIs are ffa_device independent and can be used without any associated ffa_device from a non ffa_driver. In order to reflect the same, just rename ffa_dev_ops as ffa_ops to avoid any confusion or to keep it simple. Link: https://lore.kernel.org/r/[email protected] Suggested-by: Sumit Garg <[email protected]> Reviewed-by: Sumit Garg <[email protected]> Reviewed-by: Jens Wiklander <[email protected]> Signed-off-by: Sudeep Holla <[email protected]>
1 parent 8c3812c commit 7aa7a97

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

drivers/firmware/arm_ffa/bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev)
168168
}
169169

170170
struct ffa_device *ffa_device_register(const uuid_t *uuid, int vm_id,
171-
const struct ffa_dev_ops *ops)
171+
const struct ffa_ops *ops)
172172
{
173173
int ret;
174174
struct device *dev;

drivers/firmware/arm_ffa/driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ static int ffa_memory_lend(struct ffa_mem_ops_args *args)
666666
return ffa_memory_ops(FFA_MEM_LEND, args);
667667
}
668668

669-
static const struct ffa_dev_ops ffa_ops = {
669+
static const struct ffa_ops ffa_ops = {
670670
.api_version_get = ffa_api_version_get,
671671
.partition_info_get = ffa_partition_info_get,
672672
.mode_32bit_set = ffa_mode_32bit_set,

drivers/tee/optee/ffa_abi.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static int optee_ffa_shm_register(struct tee_context *ctx, struct tee_shm *shm,
272272
{
273273
struct optee *optee = tee_get_drvdata(ctx->teedev);
274274
struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
275-
const struct ffa_dev_ops *ffa_ops = ffa_dev->ops;
275+
const struct ffa_ops *ffa_ops = ffa_dev->ops;
276276
struct ffa_mem_region_attributes mem_attr = {
277277
.receiver = ffa_dev->vm_id,
278278
.attrs = FFA_MEM_RW,
@@ -315,7 +315,7 @@ static int optee_ffa_shm_unregister(struct tee_context *ctx,
315315
{
316316
struct optee *optee = tee_get_drvdata(ctx->teedev);
317317
struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
318-
const struct ffa_dev_ops *ffa_ops = ffa_dev->ops;
318+
const struct ffa_ops *ffa_ops = ffa_dev->ops;
319319
u64 global_handle = shm->sec_world_id;
320320
struct ffa_send_direct_data data = {
321321
.data0 = OPTEE_FFA_UNREGISTER_SHM,
@@ -342,7 +342,7 @@ static int optee_ffa_shm_unregister_supp(struct tee_context *ctx,
342342
struct tee_shm *shm)
343343
{
344344
struct optee *optee = tee_get_drvdata(ctx->teedev);
345-
const struct ffa_dev_ops *ffa_ops = optee->ffa.ffa_dev->ops;
345+
const struct ffa_ops *ffa_ops = optee->ffa.ffa_dev->ops;
346346
u64 global_handle = shm->sec_world_id;
347347
int rc;
348348

@@ -530,7 +530,7 @@ static int optee_ffa_yielding_call(struct tee_context *ctx,
530530
{
531531
struct optee *optee = tee_get_drvdata(ctx->teedev);
532532
struct ffa_device *ffa_dev = optee->ffa.ffa_dev;
533-
const struct ffa_dev_ops *ffa_ops = ffa_dev->ops;
533+
const struct ffa_ops *ffa_ops = ffa_dev->ops;
534534
struct optee_call_waiter w;
535535
u32 cmd = data->data0;
536536
u32 w4 = data->data1;
@@ -652,7 +652,7 @@ static int optee_ffa_do_call_with_arg(struct tee_context *ctx,
652652
*/
653653

654654
static bool optee_ffa_api_is_compatbile(struct ffa_device *ffa_dev,
655-
const struct ffa_dev_ops *ops)
655+
const struct ffa_ops *ops)
656656
{
657657
struct ffa_send_direct_data data = { OPTEE_FFA_GET_API_VERSION };
658658
int rc;
@@ -687,7 +687,7 @@ static bool optee_ffa_api_is_compatbile(struct ffa_device *ffa_dev,
687687
}
688688

689689
static bool optee_ffa_exchange_caps(struct ffa_device *ffa_dev,
690-
const struct ffa_dev_ops *ops,
690+
const struct ffa_ops *ops,
691691
u32 *sec_caps,
692692
unsigned int *rpc_param_count)
693693
{
@@ -783,7 +783,7 @@ static void optee_ffa_remove(struct ffa_device *ffa_dev)
783783

784784
static int optee_ffa_probe(struct ffa_device *ffa_dev)
785785
{
786-
const struct ffa_dev_ops *ffa_ops;
786+
const struct ffa_ops *ffa_ops;
787787
unsigned int rpc_param_count;
788788
struct tee_shm_pool *pool;
789789
struct tee_device *teedev;

include/linux/arm_ffa.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ struct ffa_device {
1717
bool mode_32bit;
1818
uuid_t uuid;
1919
struct device dev;
20-
const struct ffa_dev_ops *ops;
20+
const struct ffa_ops *ops;
2121
};
2222

2323
#define to_ffa_dev(d) container_of(d, struct ffa_device, dev)
@@ -49,7 +49,7 @@ static inline void *ffa_dev_get_drvdata(struct ffa_device *fdev)
4949

5050
#if IS_REACHABLE(CONFIG_ARM_FFA_TRANSPORT)
5151
struct ffa_device *ffa_device_register(const uuid_t *uuid, int vm_id,
52-
const struct ffa_dev_ops *ops);
52+
const struct ffa_ops *ops);
5353
void ffa_device_unregister(struct ffa_device *ffa_dev);
5454
int ffa_driver_register(struct ffa_driver *driver, struct module *owner,
5555
const char *mod_name);
@@ -59,7 +59,7 @@ bool ffa_device_is_valid(struct ffa_device *ffa_dev);
5959
#else
6060
static inline
6161
struct ffa_device *ffa_device_register(const uuid_t *uuid, int vm_id,
62-
const struct ffa_dev_ops *ops)
62+
const struct ffa_ops *ops)
6363
{
6464
return NULL;
6565
}
@@ -254,7 +254,7 @@ struct ffa_mem_ops_args {
254254
struct ffa_mem_region_attributes *attrs;
255255
};
256256

257-
struct ffa_dev_ops {
257+
struct ffa_ops {
258258
u32 (*api_version_get)(void);
259259
int (*partition_info_get)(const char *uuid_str,
260260
struct ffa_partition_info *buffer);

0 commit comments

Comments
 (0)