X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Frtc%2Fi2c_rtc_emul.c;h=d4b33e59d6966835b2e4a6212eb6eb472d43ac66;hb=ef6c26d338a168110b7688b07e319ff46c73748d;hp=20827fdff135b8a6e60bc570b8a50f531a69364e;hpb=dd18e5d8441e12e4ed084dfe7400112851b807f8;p=oweals%2Fu-boot.git diff --git a/drivers/rtc/i2c_rtc_emul.c b/drivers/rtc/i2c_rtc_emul.c index 20827fdff1..d4b33e59d6 100644 --- a/drivers/rtc/i2c_rtc_emul.c +++ b/drivers/rtc/i2c_rtc_emul.c @@ -1,10 +1,9 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Simulate an I2C real time clock * * Copyright (c) 2015 Google, Inc * Written by Simon Glass - * - * SPDX-License-Identifier: GPL-2.0+ */ /* @@ -16,7 +15,6 @@ #include #include -#include #include #include #include @@ -29,8 +27,6 @@ #define debug_buffer(x, ...) #endif -DECLARE_GLOBAL_DATA_PTR; - /** * struct sandbox_i2c_rtc_plat_data - platform data for the RTC * @@ -100,7 +96,9 @@ static int sandbox_i2c_rtc_get(struct udevice *dev, struct rtc_time *time) now = plat->base_time; } - return rtc_to_tm(now + plat->offset, time); + rtc_to_tm(now + plat->offset, time); + + return 0; } static int sandbox_i2c_rtc_set(struct udevice *dev, const struct rtc_time *time)