]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
Merge tag 'tee-misc-for-v5.1' of https://git.linaro.org/people/jens.wiklander/linux...
authorArnd Bergmann <arnd@arndb.de>
Fri, 1 Mar 2019 14:00:40 +0000 (15:00 +0100)
committerArnd Bergmann <arnd@arndb.de>
Fri, 1 Mar 2019 14:01:16 +0000 (15:01 +0100)
OP-TEE driver
- dual license for optee_msg.h and optee_smc.h
Generic
- add cancellation support to client interface

* tag 'tee-misc-for-v5.1' of https://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: optee: update optee_msg.h and optee_smc.h to dual license
  tee: add cancellation support to client interface

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1  2 
drivers/tee/tee_core.c

diff --combined drivers/tee/tee_core.c
index 06fbfc044ea33ea0926bb7af3200e2ddb3e48796,ecffdd8a29b71e474a5ea35702a88062e565aa35..17c64fccbb10f3fde59114dde5ae4d2c73ece664
@@@ -993,9 -993,7 +993,9 @@@ tee_client_open_context(struct tee_cont
         * tee_client_open_session() if any in kernel client requires
         * different behaviour.
         */
 -      ctx->supp_nowait = true;
 +      if (!IS_ERR(ctx))
 +              ctx->supp_nowait = true;
 +
        return ctx;
  }
  EXPORT_SYMBOL_GPL(tee_client_open_context);
@@@ -1041,6 -1039,15 +1041,15 @@@ int tee_client_invoke_func(struct tee_c
  }
  EXPORT_SYMBOL_GPL(tee_client_invoke_func);
  
+ int tee_client_cancel_req(struct tee_context *ctx,
+                         struct tee_ioctl_cancel_arg *arg)
+ {
+       if (!ctx->teedev->desc->ops->cancel_req)
+               return -EINVAL;
+       return ctx->teedev->desc->ops->cancel_req(ctx, arg->cancel_id,
+                                                 arg->session);
+ }
  static int tee_client_device_match(struct device *dev,
                                   struct device_driver *drv)
  {