Merge tag 'tee-drv-for-4.20' of git://git.linaro.org/people/jens.wiklander/linux...
authorOlof Johansson <olof@lixom.net>
Sun, 26 Aug 2018 23:27:32 +0000 (16:27 -0700)
committerOlof Johansson <olof@lixom.net>
Sun, 26 Aug 2018 23:27:32 +0000 (16:27 -0700)
Misc enhancement for tee driver subsystem

* Adds a kernel internal tee client interface allowing other drivers
  etc to access a TEE
* OP-TEE driver takes DT status property into account

* tag 'tee-drv-for-4.20' of git://git.linaro.org/people/jens.wiklander/linux-tee:
  tee: add kernel internal client interface
  tee: optee: take DT status property into account

Signed-off-by: Olof Johansson <olof@lixom.net>
1  2 
drivers/tee/optee/core.c

diff --combined drivers/tee/optee/core.c
index e1aafe842d660bb11b1146133105f37bff24873e,69ea1efbb051d032bf68e6f867549d61550b912d..34dce850067b9e9c379274ef8b3c91da4bb42ef0
@@@ -32,7 -32,7 +32,7 @@@
  
  #define DRIVER_NAME "optee"
  
 -#define OPTEE_SHM_NUM_PRIV_PAGES      1
 +#define OPTEE_SHM_NUM_PRIV_PAGES      CONFIG_OPTEE_SHM_NUM_PRIV_PAGES
  
  /**
   * optee_from_msg_param() - convert from OPTEE_MSG parameters to
@@@ -696,7 -696,7 +696,7 @@@ static int __init optee_driver_init(voi
                return -ENODEV;
  
        np = of_find_matching_node(fw_np, optee_match);
-       if (!np)
+       if (!np || !of_device_is_available(np))
                return -ENODEV;
  
        optee = optee_probe(np);