diff options
author | Simon Glass <sjg@chromium.org> | 2015-10-18 15:55:30 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-10-21 07:46:50 -0600 |
commit | b26eb88658b9fbb87c5bae22cede05de3124abb7 (patch) | |
tree | 1629b9f4dc71ab4520317b024b99693bca1995bf /drivers/rtc/mc146818.c | |
parent | 1bcb5c3a6cbaaf29d03bd58d068a7d42042476d5 (diff) |
rtc: mc146818: Use probe() to set up the device
At present this driver uses bind() to set up the device. The bind() method
should not touch the hardware, so move the init code to probe().
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/rtc/mc146818.c')
-rw-r--r-- | drivers/rtc/mc146818.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/rtc/mc146818.c b/drivers/rtc/mc146818.c index 9e94a807bb..da804d5459 100644 --- a/drivers/rtc/mc146818.c +++ b/drivers/rtc/mc146818.c @@ -225,7 +225,7 @@ static int rtc_mc146818_write8(struct udevice *dev, unsigned int reg, int val) return 0; } -static int rtc_mc146818_bind(struct udevice *dev) +static int rtc_mc146818_probe(struct udevice *dev) { mc146818_init(); @@ -249,7 +249,7 @@ U_BOOT_DRIVER(rtc_mc146818) = { .name = "rtc_mc146818", .id = UCLASS_RTC, .of_match = rtc_mc146818_ids, - .bind = rtc_mc146818_bind, + .probe = rtc_mc146818_probe, .ops = &rtc_mc146818_ops, }; |