| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * rtc-mrst.c: Driver for Moorestown virtual RTC |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * (C) Copyright 2009 Intel Corporation |
|---|
| 5 | 6 | * Author: Jacob Pan (jacob.jun.pan@intel.com) |
|---|
| 6 | 7 | * Feng Tang (feng.tang@intel.com) |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or |
|---|
| 9 | | - * modify it under the terms of the GNU General Public License |
|---|
| 10 | | - * as published by the Free Software Foundation; version 2 |
|---|
| 11 | | - * of the License. |
|---|
| 12 | 8 | * |
|---|
| 13 | 9 | * Note: |
|---|
| 14 | 10 | * VRTC is emulated by system controller firmware, the real HW |
|---|
| .. | .. |
|---|
| 90 | 86 | unsigned long flags; |
|---|
| 91 | 87 | |
|---|
| 92 | 88 | if (vrtc_is_updating()) |
|---|
| 93 | | - mdelay(20); |
|---|
| 89 | + msleep(20); |
|---|
| 94 | 90 | |
|---|
| 95 | 91 | spin_lock_irqsave(&rtc_lock, flags); |
|---|
| 96 | 92 | time->tm_sec = vrtc_cmos_read(RTC_SECONDS); |
|---|
| .. | .. |
|---|
| 261 | 257 | |
|---|
| 262 | 258 | static int mrst_procfs(struct device *dev, struct seq_file *seq) |
|---|
| 263 | 259 | { |
|---|
| 264 | | - unsigned char rtc_control, valid; |
|---|
| 260 | + unsigned char rtc_control; |
|---|
| 265 | 261 | |
|---|
| 266 | 262 | spin_lock_irq(&rtc_lock); |
|---|
| 267 | 263 | rtc_control = vrtc_cmos_read(RTC_CONTROL); |
|---|
| 268 | | - valid = vrtc_cmos_read(RTC_VALID); |
|---|
| 269 | 264 | spin_unlock_irq(&rtc_lock); |
|---|
| 270 | 265 | |
|---|
| 271 | 266 | seq_printf(seq, |
|---|