mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-14 11:24:39 -05: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:
committed by
Jens Wiklander
parent
21ecfe424b
commit
5e9151cecb
@@ -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 @@ static int optee_rng_probe(struct device *dev)
|
||||
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,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user