Lines Matching refs:mod
63 static int keymaster0_device_initialize(const hw_module_t* mod, keymaster2_device_t** dev) { in keymaster0_device_initialize() argument
64 assert(mod->module_api_version < KEYMASTER_MODULE_API_VERSION_1_0); in keymaster0_device_initialize()
65 ALOGI("Found keymaster0 module %s, version %x", mod->name, mod->module_api_version); in keymaster0_device_initialize()
71 int rc = keymaster0_open(mod, &km0_device); in keymaster0_device_initialize()
86 ALOGD("Wrapping keymaster0 module %s with SoftKeymasterDevice", mod->name); in keymaster0_device_initialize()
105 static int keymaster1_device_initialize(const hw_module_t* mod, keymaster2_device_t** dev, in keymaster1_device_initialize() argument
107 assert(mod->module_api_version >= KEYMASTER_MODULE_API_VERSION_1_0); in keymaster1_device_initialize()
108 ALOGI("Found keymaster1 module %s, version %x", mod->name, mod->module_api_version); in keymaster1_device_initialize()
114 int rc = keymaster1_open(mod, &km1_device); in keymaster1_device_initialize()
120 ALOGD("Wrapping keymaster1 module %s with SofKeymasterDevice", mod->name); in keymaster1_device_initialize()
140 static int keymaster2_device_initialize(const hw_module_t* mod, keymaster2_device_t** dev) { in keymaster2_device_initialize() argument
141 assert(mod->module_api_version >= KEYMASTER_MODULE_API_VERSION_2_0); in keymaster2_device_initialize()
142 ALOGI("Found keymaster2 module %s, version %x", mod->name, mod->module_api_version); in keymaster2_device_initialize()
146 int rc = keymaster2_open(mod, &km2_device); in keymaster2_device_initialize()
163 const hw_module_t* mod; in keymaster_device_initialize() local
167 int rc = hw_get_module_by_class(KEYSTORE_HARDWARE_MODULE_ID, NULL, &mod); in keymaster_device_initialize()
176 if (mod->module_api_version < KEYMASTER_MODULE_API_VERSION_1_0) { in keymaster_device_initialize()
179 int rc = keymaster0_device_initialize(mod, dev); in keymaster_device_initialize()
184 } else if (mod->module_api_version == KEYMASTER_MODULE_API_VERSION_1_0) { in keymaster_device_initialize()
186 return keymaster1_device_initialize(mod, dev, supports_all_digests); in keymaster_device_initialize()
190 return keymaster2_device_initialize(mod, dev); in keymaster_device_initialize()