1 #include <linux/kernel.h>
2 #include <linux/slab.h>
3 #include <linux/tapi/tapi.h>
6 #include "vmmc-module.h"
8 struct vmmc_tapi_link
{
9 struct tapi_link tapi_link
;
10 struct vmmc_link vmmc_link
;
13 struct tapi_link
*vmmc_tapi_link_alloc(struct tapi_device
*tdev
,
14 struct tapi_endpoint
*ep1
, struct tapi_endpoint
*ep2
)
16 struct vmmc_tapi_link
*link
= kzalloc(sizeof(*link
), GFP_KERNEL
);
17 struct vmmc_module
*module1
= tapi_endpoint_to_vmmc_module(ep1
);
18 struct vmmc_module
*module2
= tapi_endpoint_to_vmmc_module(ep2
);
20 vmmc_link_init(&link
->vmmc_link
, module1
, module2
);
22 return &link
->tapi_link
;
25 void vmmc_tapi_link_free(struct tapi_device
*tdev
, struct tapi_link
*tapi_link
)
27 struct vmmc_tapi_link
*link
= container_of(tapi_link
, struct vmmc_tapi_link
,
30 vmmc_link_put(&link
->vmmc_link
);
34 int vmmc_tapi_link_enable(struct tapi_device
*tdev
,
35 struct tapi_link
*tapi_link
)
37 struct vmmc_tapi_link
*link
= container_of(tapi_link
, struct vmmc_tapi_link
,
40 vmmc_link_enable(&link
->vmmc_link
);
44 int vmmc_tapi_link_disable(struct tapi_device
*tdev
,
45 struct tapi_link
*tapi_link
)
47 struct vmmc_tapi_link
*link
= container_of(tapi_link
, struct vmmc_tapi_link
,
50 vmmc_link_disable(&link
->vmmc_link
);
This page took 0.038206 seconds and 5 git commands to generate.