diff options
author | Bhumika Goyal <bhumirks@gmail.com> | 2017-06-29 15:05:04 +0530 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2018-01-22 13:16:20 +0530 |
commit | 0d65b3d6e1a8db895324d692552d9c7d123812ec (patch) | |
tree | 9f7ecf81912285608d3b0fa5fa948c44186f91b1 /drivers/tee | |
parent | 19f15a23c420e0cf69cc2886d5082f7d3f9b0991 (diff) |
BACKPORT: tee: optee: add const to tee_driver_ops and tee_desc structures
Add const to tee_desc structures as they are only passed as an argument
to the function tee_device_alloc. This argument is of type const, so
declare these structures as const too.
Add const to tee_driver_ops structures as they are only stored in the
ops field of a tee_desc structure. This field is of type const, so
declare these structure types as const.
Change-Id: Ia9d0348f4dd5078a8a48c74739b69c0871c61bd0
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
(cherry picked from commit 96e72ddeec4546fda0e194298c2ee39e394a3ab7)
Signed-off-by: Victor Chong <victor.chong@linaro.org>
Diffstat (limited to 'drivers/tee')
-rw-r--r-- | drivers/tee/optee/core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c index 071eaea29228..edb6e4e9ef3a 100644 --- a/drivers/tee/optee/core.c +++ b/drivers/tee/optee/core.c @@ -259,7 +259,7 @@ static void optee_release(struct tee_context *ctx) } } -static struct tee_driver_ops optee_ops = { +static const struct tee_driver_ops optee_ops = { .get_version = optee_get_version, .open = optee_open, .release = optee_release, @@ -269,13 +269,13 @@ static struct tee_driver_ops optee_ops = { .cancel_req = optee_cancel_req, }; -static struct tee_desc optee_desc = { +static const struct tee_desc optee_desc = { .name = DRIVER_NAME "-clnt", .ops = &optee_ops, .owner = THIS_MODULE, }; -static struct tee_driver_ops optee_supp_ops = { +static const struct tee_driver_ops optee_supp_ops = { .get_version = optee_get_version, .open = optee_open, .release = optee_release, @@ -283,7 +283,7 @@ static struct tee_driver_ops optee_supp_ops = { .supp_send = optee_supp_send, }; -static struct tee_desc optee_supp_desc = { +static const struct tee_desc optee_supp_desc = { .name = DRIVER_NAME "-supp", .ops = &optee_supp_ops, .owner = THIS_MODULE, |