rtc: Move RTC function prototypes to their own header
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 29 Nov 2021 20:55:05 +0000 (20:55 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 28 Jan 2022 14:29:46 +0000 (14:29 +0000)
commit2f93d8b04a1bcc8e0a576e35ae13c96af42634db
tree43d1e77588ca78e05ee83d90dedcc3bfec6fca4f
parent617dff091f3478db9a44320df03f74b9df0617fb
rtc: Move RTC function prototypes to their own header

softmmu/rtc.c defines two public functions: qemu_get_timedate() and
qemu_timedate_diff().  Currently we keep the prototypes for these in
qemu-common.h, but most files don't need them.  Move them to their
own header, a new include/sysemu/rtc.h.

Since the C files using these two functions did not need to include
qemu-common.h for any other reason, we can remove those include lines
when we add the include of the new rtc.h.

The license for the .h file follows that of the softmmu/rtc.c
where both the functions are defined.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
24 files changed:
hw/arm/omap1.c
hw/arm/pxa2xx.c
hw/arm/strongarm.c
hw/misc/mac_via.c
hw/misc/macio/cuda.c
hw/misc/macio/pmu.c
hw/ppc/spapr_rtc.c
hw/rtc/allwinner-rtc.c
hw/rtc/aspeed_rtc.c
hw/rtc/ds1338.c
hw/rtc/exynos4210_rtc.c
hw/rtc/goldfish_rtc.c
hw/rtc/m41t80.c
hw/rtc/m48t59.c
hw/rtc/mc146818rtc.c
hw/rtc/pl031.c
hw/rtc/twl92230.c
hw/rtc/xlnx-zynqmp-rtc.c
hw/s390x/tod-tcg.c
hw/scsi/megasas.c
include/qemu-common.h
include/sysemu/rtc.h [new file with mode: 0644]
net/dump.c
softmmu/rtc.c