mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:44:45 +01:00
hwrng: optee - 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> Acked-by: Herbert Xu <herbert@gondor.apana.org.au> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
This commit is contained in:
parent
21ecfe424b
commit
5e9151cecb
1 changed files with 5 additions and 7 deletions
|
|
@ -211,9 +211,9 @@ static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int optee_rng_probe(struct device *dev)
|
||||
static int optee_rng_probe(struct tee_client_device *rng_device)
|
||||
{
|
||||
struct tee_client_device *rng_device = to_tee_client_device(dev);
|
||||
struct device *dev = &rng_device->dev;
|
||||
int ret = 0, err = -ENODEV;
|
||||
struct tee_ioctl_open_session_arg sess_arg;
|
||||
|
||||
|
|
@ -261,12 +261,10 @@ out_ctx:
|
|||
return err;
|
||||
}
|
||||
|
||||
static int optee_rng_remove(struct device *dev)
|
||||
static void optee_rng_remove(struct tee_client_device *tee_dev)
|
||||
{
|
||||
tee_client_close_session(pvt_data.ctx, pvt_data.session_id);
|
||||
tee_client_close_context(pvt_data.ctx);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct tee_client_device_id optee_rng_id_table[] = {
|
||||
|
|
@ -278,11 +276,11 @@ static const struct tee_client_device_id optee_rng_id_table[] = {
|
|||
MODULE_DEVICE_TABLE(tee, optee_rng_id_table);
|
||||
|
||||
static struct tee_client_driver optee_rng_driver = {
|
||||
.probe = optee_rng_probe,
|
||||
.remove = optee_rng_remove,
|
||||
.id_table = optee_rng_id_table,
|
||||
.driver = {
|
||||
.name = DRIVER_NAME,
|
||||
.probe = optee_rng_probe,
|
||||
.remove = optee_rng_remove,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue