Skip to content

Commit 4f32b63

Browse files
ukleinekjenswi-linaro
authored andcommitted
rtc: 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> Acked-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
1 parent 6d8a003 commit 4f32b63

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

drivers/rtc/rtc-optee.c

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -547,9 +547,9 @@ static int optee_ctx_match(struct tee_ioctl_version_data *ver, const void *data)
547547
return 0;
548548
}
549549

550-
static int optee_rtc_probe(struct device *dev)
550+
static int optee_rtc_probe(struct tee_client_device *rtc_device)
551551
{
552-
struct tee_client_device *rtc_device = to_tee_client_device(dev);
552+
struct device *dev = &rtc_device->dev;
553553
struct tee_ioctl_open_session_arg sess2_arg = {0};
554554
struct tee_ioctl_open_session_arg sess_arg = {0};
555555
struct optee_rtc *priv;
@@ -682,8 +682,9 @@ static int optee_rtc_probe(struct device *dev)
682682
return err;
683683
}
684684

685-
static int optee_rtc_remove(struct device *dev)
685+
static void optee_rtc_remove(struct tee_client_device *rtc_device)
686686
{
687+
struct device *dev = &rtc_device->dev;
687688
struct optee_rtc *priv = dev_get_drvdata(dev);
688689

689690
if (priv->features & TA_RTC_FEATURE_ALARM) {
@@ -696,8 +697,6 @@ static int optee_rtc_remove(struct device *dev)
696697
tee_shm_free(priv->shm);
697698
tee_client_close_session(priv->ctx, priv->session_id);
698699
tee_client_close_context(priv->ctx);
699-
700-
return 0;
701700
}
702701

703702
static int optee_rtc_suspend(struct device *dev)
@@ -724,10 +723,10 @@ MODULE_DEVICE_TABLE(tee, optee_rtc_id_table);
724723

725724
static struct tee_client_driver optee_rtc_driver = {
726725
.id_table = optee_rtc_id_table,
726+
.probe = optee_rtc_probe,
727+
.remove = optee_rtc_remove,
727728
.driver = {
728729
.name = "optee_rtc",
729-
.probe = optee_rtc_probe,
730-
.remove = optee_rtc_remove,
731730
.pm = pm_sleep_ptr(&optee_rtc_pm_ops),
732731
},
733732
};

0 commit comments

Comments
 (0)