mirror of
https://github.com/AsahiLinux/u-boot
synced 2025-02-17 22:49:02 +00:00
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>
This commit is contained in:
parent
1bcb5c3a6c
commit
b26eb88658
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue