ANDROID: rtc: class: call hctosys in resource managed registration

A prior commit added a call to hctosys in __rtc_register_device. There
is a duplicated registration path for the resource managed call which
also needs to call hctosys to support modular rtc drivers.

Bug: 156703426
Signed-off-by: Steve Muckle <smuckle@google.com>
Change-Id: Ia454b2315405e3791a922e7191aa10c35800611b
This commit is contained in:
Steve Muckle 2020-05-19 11:36:51 -07:00
parent 6ec0d9c642
commit 86a7389d75

View file

@ -341,6 +341,11 @@ struct rtc_device *rtc_device_register(const char *name, struct device *dev,
dev_info(dev, "rtc core: registered %s as %s\n",
name, dev_name(&rtc->dev));
#ifdef CONFIG_RTC_HCTOSYS_DEVICE
if (!strcmp(dev_name(&rtc->dev), CONFIG_RTC_HCTOSYS_DEVICE))
rtc_hctosys();
#endif
return rtc;
exit_ida: