mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 20:40:52 +07:00
[PATCH] RTC subsystem: fix proc output
Move the "24hr: yes" proc output from drivers to rtc proc code. This is required because the time value in the proc output is always in 24hr mode regardless of the driver. Signed-off-by: Alessandro Zummo <a.zummo@towertech.it> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
f90a65060e
commit
adfb434125
@ -67,7 +67,6 @@ static int ep93xx_rtc_proc(struct device *dev, struct seq_file *seq)
|
|||||||
|
|
||||||
ep93xx_get_swcomp(dev, &preload, &delete);
|
ep93xx_get_swcomp(dev, &preload, &delete);
|
||||||
|
|
||||||
seq_printf(seq, "24hr\t\t: yes\n");
|
|
||||||
seq_printf(seq, "preload\t\t: %d\n", preload);
|
seq_printf(seq, "preload\t\t: %d\n", preload);
|
||||||
seq_printf(seq, "delete\t\t: %d\n", delete);
|
seq_printf(seq, "delete\t\t: %d\n", delete);
|
||||||
|
|
||||||
|
@ -127,9 +127,6 @@ static int m48t86_rtc_proc(struct device *dev, struct seq_file *seq)
|
|||||||
|
|
||||||
reg = ops->readb(M48T86_REG_B);
|
reg = ops->readb(M48T86_REG_B);
|
||||||
|
|
||||||
seq_printf(seq, "24hr\t\t: %s\n",
|
|
||||||
(reg & M48T86_REG_B_H24) ? "yes" : "no");
|
|
||||||
|
|
||||||
seq_printf(seq, "mode\t\t: %s\n",
|
seq_printf(seq, "mode\t\t: %s\n",
|
||||||
(reg & M48T86_REG_B_DM) ? "binary" : "bcd");
|
(reg & M48T86_REG_B_DM) ? "binary" : "bcd");
|
||||||
|
|
||||||
|
@ -227,14 +227,7 @@ static int pcf8563_rtc_set_time(struct device *dev, struct rtc_time *tm)
|
|||||||
return pcf8563_set_datetime(to_i2c_client(dev), tm);
|
return pcf8563_set_datetime(to_i2c_client(dev), tm);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int pcf8563_rtc_proc(struct device *dev, struct seq_file *seq)
|
|
||||||
{
|
|
||||||
seq_printf(seq, "24hr\t\t: yes\n");
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
static struct rtc_class_ops pcf8563_rtc_ops = {
|
static struct rtc_class_ops pcf8563_rtc_ops = {
|
||||||
.proc = pcf8563_rtc_proc,
|
|
||||||
.read_time = pcf8563_rtc_read_time,
|
.read_time = pcf8563_rtc_read_time,
|
||||||
.set_time = pcf8563_rtc_set_time,
|
.set_time = pcf8563_rtc_set_time,
|
||||||
};
|
};
|
||||||
|
@ -71,6 +71,8 @@ static int rtc_proc_show(struct seq_file *seq, void *offset)
|
|||||||
alrm.pending ? "yes" : "no");
|
alrm.pending ? "yes" : "no");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
seq_printf(seq, "24hr\t\t: yes\n");
|
||||||
|
|
||||||
if (ops->proc)
|
if (ops->proc)
|
||||||
ops->proc(class_dev->dev, seq);
|
ops->proc(class_dev->dev, seq);
|
||||||
|
|
||||||
|
@ -151,9 +151,8 @@ static int rs5c372_rtc_proc(struct device *dev, struct seq_file *seq)
|
|||||||
{
|
{
|
||||||
int err, osc, trim;
|
int err, osc, trim;
|
||||||
|
|
||||||
seq_printf(seq, "24hr\t\t: yes\n");
|
err = rs5c372_get_trim(to_i2c_client(dev), &osc, &trim);
|
||||||
|
if (err == 0) {
|
||||||
if ((err = rs5c372_get_trim(to_i2c_client(dev), &osc, &trim)) == 0) {
|
|
||||||
seq_printf(seq, "%d.%03d KHz\n", osc / 1000, osc % 1000);
|
seq_printf(seq, "%d.%03d KHz\n", osc / 1000, osc % 1000);
|
||||||
seq_printf(seq, "trim\t: %d\n", trim);
|
seq_printf(seq, "trim\t: %d\n", trim);
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,6 @@ static int test_rtc_proc(struct device *dev, struct seq_file *seq)
|
|||||||
{
|
{
|
||||||
struct platform_device *plat_dev = to_platform_device(dev);
|
struct platform_device *plat_dev = to_platform_device(dev);
|
||||||
|
|
||||||
seq_printf(seq, "24hr\t\t: yes\n");
|
|
||||||
seq_printf(seq, "test\t\t: yes\n");
|
seq_printf(seq, "test\t\t: yes\n");
|
||||||
seq_printf(seq, "id\t\t: %d\n", plat_dev->id);
|
seq_printf(seq, "id\t\t: %d\n", plat_dev->id);
|
||||||
|
|
||||||
|
@ -451,8 +451,6 @@ static int x1205_rtc_proc(struct device *dev, struct seq_file *seq)
|
|||||||
{
|
{
|
||||||
int err, dtrim, atrim;
|
int err, dtrim, atrim;
|
||||||
|
|
||||||
seq_printf(seq, "24hr\t\t: yes\n");
|
|
||||||
|
|
||||||
if ((err = x1205_get_dtrim(to_i2c_client(dev), &dtrim)) == 0)
|
if ((err = x1205_get_dtrim(to_i2c_client(dev), &dtrim)) == 0)
|
||||||
seq_printf(seq, "digital_trim\t: %d ppm\n", dtrim);
|
seq_printf(seq, "digital_trim\t: %d ppm\n", dtrim);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user