From: Uwe Kleine-König Date: Mon, 15 Dec 2025 14:16:36 +0000 (+0100) Subject: rtc: optee: Migrate to use tee specific driver registration function X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6d8a0031d92d56f0cf57947df408d5cafd57bb22;p=thirdparty%2Fkernel%2Flinux.git 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 Acked-by: Alexandre Belloni Signed-off-by: Uwe Kleine-König Signed-off-by: Jens Wiklander --- diff --git a/drivers/rtc/rtc-optee.c b/drivers/rtc/rtc-optee.c index 184c6d1428016..f924a729ead0d 100644 --- a/drivers/rtc/rtc-optee.c +++ b/drivers/rtc/rtc-optee.c @@ -726,25 +726,13 @@ static struct tee_client_driver optee_rtc_driver = { .id_table = optee_rtc_id_table, .driver = { .name = "optee_rtc", - .bus = &tee_bus_type, .probe = optee_rtc_probe, .remove = optee_rtc_remove, .pm = pm_sleep_ptr(&optee_rtc_pm_ops), }, }; -static int __init optee_rtc_mod_init(void) -{ - return driver_register(&optee_rtc_driver.driver); -} - -static void __exit optee_rtc_mod_exit(void) -{ - driver_unregister(&optee_rtc_driver.driver); -} - -module_init(optee_rtc_mod_init); -module_exit(optee_rtc_mod_exit); +module_tee_client_driver(optee_rtc_driver); MODULE_LICENSE("GPL v2"); MODULE_AUTHOR("Clément Léger ");