summaryrefslogtreecommitdiff
path: root/drivers/tee
diff options
context:
space:
mode:
authorBhumika Goyal <bhumirks@gmail.com>2017-06-29 15:05:04 +0530
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commit05f7f0ac099be4c044a92de2b5bcb8d0c9fc6ba0 (patch)
treeb3023d31a522c9bf5eff79caeb46017c01399744 /drivers/tee
parentb94ea0fd9ebdc4ea79ec89dc9169ceb69bc82285 (diff)
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: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org> (cherry picked from commit 96e72ddeec4546fda0e194298c2ee39e394a3ab7)
Diffstat (limited to 'drivers/tee')
-rw-r--r--drivers/tee/optee/core.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/tee/optee/core.c b/drivers/tee/optee/core.c
index 3516e0423d28..b7492da92567 100644
--- a/drivers/tee/optee/core.c
+++ b/drivers/tee/optee/core.c
@@ -256,7 +256,7 @@ static void optee_release(struct tee_context *ctx)
optee_supp_release(&optee->supp);
}
-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,
@@ -266,13 +266,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,
@@ -280,7 +280,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,