Commit 96e72dde authored by Bhumika Goyal's avatar Bhumika Goyal Committed by Jens Wiklander

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.
Signed-off-by: default avatarBhumika Goyal <bhumirks@gmail.com>
Signed-off-by: default avatarJens Wiklander <jens.wiklander@linaro.org>
parent 53e3ca5c
...@@ -259,7 +259,7 @@ static void optee_release(struct tee_context *ctx) ...@@ -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, .get_version = optee_get_version,
.open = optee_open, .open = optee_open,
.release = optee_release, .release = optee_release,
...@@ -269,13 +269,13 @@ static struct tee_driver_ops optee_ops = { ...@@ -269,13 +269,13 @@ static struct tee_driver_ops optee_ops = {
.cancel_req = optee_cancel_req, .cancel_req = optee_cancel_req,
}; };
static struct tee_desc optee_desc = { static const struct tee_desc optee_desc = {
.name = DRIVER_NAME "-clnt", .name = DRIVER_NAME "-clnt",
.ops = &optee_ops, .ops = &optee_ops,
.owner = THIS_MODULE, .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, .get_version = optee_get_version,
.open = optee_open, .open = optee_open,
.release = optee_release, .release = optee_release,
...@@ -283,7 +283,7 @@ static struct tee_driver_ops optee_supp_ops = { ...@@ -283,7 +283,7 @@ static struct tee_driver_ops optee_supp_ops = {
.supp_send = optee_supp_send, .supp_send = optee_supp_send,
}; };
static struct tee_desc optee_supp_desc = { static const struct tee_desc optee_supp_desc = {
.name = DRIVER_NAME "-supp", .name = DRIVER_NAME "-supp",
.ops = &optee_supp_ops, .ops = &optee_supp_ops,
.owner = THIS_MODULE, .owner = THIS_MODULE,
......
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