Skip to content

Commit c6ef3e9

Browse files
ukleinekjenswi-linaro
authored andcommitted
KEYS: trusted: Make use of tee bus methods
The tee bus got dedicated callbacks for probe and remove. Make use of these. This fixes a runtime warning about the driver needing to be converted to the bus methods. Reviewed-by: Sumit Garg <sumit.garg@oss.qualcomm.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
1 parent 7b7e532 commit c6ef3e9

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

security/keys/trusted-keys/trusted_tee.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,9 +202,9 @@ static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
202202
return 0;
203203
}
204204

205-
static int trusted_key_probe(struct device *dev)
205+
static int trusted_key_probe(struct tee_client_device *rng_device)
206206
{
207-
struct tee_client_device *rng_device = to_tee_client_device(dev);
207+
struct device *dev = &rng_device->dev;
208208
int ret;
209209
struct tee_ioctl_open_session_arg sess_arg;
210210

@@ -244,13 +244,11 @@ static int trusted_key_probe(struct device *dev)
244244
return ret;
245245
}
246246

247-
static int trusted_key_remove(struct device *dev)
247+
static void trusted_key_remove(struct tee_client_device *dev)
248248
{
249249
unregister_key_type(&key_type_trusted);
250250
tee_client_close_session(pvt_data.ctx, pvt_data.session_id);
251251
tee_client_close_context(pvt_data.ctx);
252-
253-
return 0;
254252
}
255253

256254
static const struct tee_client_device_id trusted_key_id_table[] = {
@@ -261,11 +259,11 @@ static const struct tee_client_device_id trusted_key_id_table[] = {
261259
MODULE_DEVICE_TABLE(tee, trusted_key_id_table);
262260

263261
static struct tee_client_driver trusted_key_driver = {
262+
.probe = trusted_key_probe,
263+
.remove = trusted_key_remove,
264264
.id_table = trusted_key_id_table,
265265
.driver = {
266266
.name = DRIVER_NAME,
267-
.probe = trusted_key_probe,
268-
.remove = trusted_key_remove,
269267
},
270268
};
271269

0 commit comments

Comments
 (0)