Skip to content

Commit 6d8a003

Browse files
ukleinekjenswi-linaro
authored andcommitted
rtc: optee: Migrate to use tee specific driver registration function
The tee subsystem recently got a set of dedicated functions to register (and unregister) a tee driver. Make use of them. These care for setting the driver's bus (so the explicit assignment can be dropped) and the driver owner (which is an improvement this driver benefits from). 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 71e4724 commit 6d8a003

1 file changed

Lines changed: 1 addition & 13 deletions

File tree

drivers/rtc/rtc-optee.c

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -726,25 +726,13 @@ static struct tee_client_driver optee_rtc_driver = {
726726
.id_table = optee_rtc_id_table,
727727
.driver = {
728728
.name = "optee_rtc",
729-
.bus = &tee_bus_type,
730729
.probe = optee_rtc_probe,
731730
.remove = optee_rtc_remove,
732731
.pm = pm_sleep_ptr(&optee_rtc_pm_ops),
733732
},
734733
};
735734

736-
static int __init optee_rtc_mod_init(void)
737-
{
738-
return driver_register(&optee_rtc_driver.driver);
739-
}
740-
741-
static void __exit optee_rtc_mod_exit(void)
742-
{
743-
driver_unregister(&optee_rtc_driver.driver);
744-
}
745-
746-
module_init(optee_rtc_mod_init);
747-
module_exit(optee_rtc_mod_exit);
735+
module_tee_client_driver(optee_rtc_driver);
748736

749737
MODULE_LICENSE("GPL v2");
750738
MODULE_AUTHOR("Clément Léger <clement.leger@bootlin.com>");

0 commit comments

Comments
 (0)