Lines Matching refs:optee

91 	struct optee *optee = tee_get_drvdata(teedev);  in optee_open()  local
97 if (teedev == optee->supp_teedev) { in optee_open()
100 mutex_lock(&optee->supp.mutex); in optee_open()
101 if (!optee->supp.ctx) { in optee_open()
103 optee->supp.ctx = ctx; in optee_open()
105 mutex_unlock(&optee->supp.mutex); in optee_open()
111 if (!optee->scan_bus_done) { in optee_open()
112 INIT_WORK(&optee->scan_bus_work, optee_bus_scan); in optee_open()
113 optee->scan_bus_wq = create_workqueue("optee_bus_scan"); in optee_open()
114 if (!optee->scan_bus_wq) { in optee_open()
118 queue_work(optee->scan_bus_wq, &optee->scan_bus_work); in optee_open()
119 optee->scan_bus_done = true; in optee_open()
158 struct optee *optee = tee_get_drvdata(ctx->teedev); in optee_release_supp() local
161 if (optee->scan_bus_wq) { in optee_release_supp()
162 destroy_workqueue(optee->scan_bus_wq); in optee_release_supp()
163 optee->scan_bus_wq = NULL; in optee_release_supp()
165 optee_supp_release(&optee->supp); in optee_release_supp()
168 void optee_remove_common(struct optee *optee) in optee_remove_common() argument
173 optee_notif_uninit(optee); in optee_remove_common()
174 optee_shm_arg_cache_uninit(optee); in optee_remove_common()
175 teedev_close_context(optee->ctx); in optee_remove_common()
180 tee_device_unregister(optee->supp_teedev); in optee_remove_common()
181 tee_device_unregister(optee->teedev); in optee_remove_common()
183 tee_shm_pool_free(optee->pool); in optee_remove_common()
184 optee_supp_uninit(&optee->supp); in optee_remove_common()
185 mutex_destroy(&optee->call_queue.mutex); in optee_remove_common()