]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blobdiff - drivers/char/rtc.c
s390/early: improve machine detection
[mirror_ubuntu-jammy-kernel.git] / drivers / char / rtc.c
index 4948c8bda6b1fb7d5dc1dd734f52ebc11307aa99..c862d0b6b118adc468278a075e405cd93e1e04f1 100644 (file)
@@ -866,8 +866,8 @@ static int __init rtc_init(void)
 #ifdef CONFIG_SPARC32
        for_each_node_by_name(ebus_dp, "ebus") {
                struct device_node *dp;
-               for (dp = ebus_dp; dp; dp = dp->sibling) {
-                       if (!strcmp(dp->name, "rtc")) {
+               for_each_child_of_node(ebus_dp, dp) {
+                       if (of_node_name_eq(dp, "rtc")) {
                                op = of_find_device_by_node(dp);
                                if (op) {
                                        rtc_port = op->resource[0].start;
@@ -1125,11 +1125,10 @@ static int rtc_proc_show(struct seq_file *seq, void *v)
         * time or for Universal Standard Time (GMT). Probably local though.
         */
        seq_printf(seq,
-                  "rtc_time\t: %02d:%02d:%02d\n"
-                  "rtc_date\t: %04d-%02d-%02d\n"
+                  "rtc_time\t: %ptRt\n"
+                  "rtc_date\t: %ptRd\n"
                   "rtc_epoch\t: %04lu\n",
-                  tm.tm_hour, tm.tm_min, tm.tm_sec,
-                  tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday, epoch);
+                  &tm, &tm, epoch);
 
        get_rtc_alm_time(&tm);