static int __init msmrtc_init(void) { int rc; /* * For backward compatibility, register multiple platform * drivers with the RPC PROG_VERS to be supported. * * Explicit cast away of 'constness' for driver.name in order to * initialize it here. */ snprintf((char *)msmrtc_driver.driver.name, strlen(msmrtc_driver.driver.name)+1, "rs%08x", TIMEREMOTE_PROG_NUMBER); pr_debug("RTC Registering with %s\n", msmrtc_driver.driver.name); rc = platform_driver_register(&msmrtc_driver); if (rc) pr_err("%s: platfrom_driver_register failed\n", __func__); alarm_sysfs_add(); return rc; }
static int vrtc_mrst_init(void) { alarm_sysfs_add(); //andy add for power off alarm return platform_driver_register(&vrtc_mrst_platform_driver); }