Skip to content

Commit 696fa1d

Browse files
rtc: test: remove irq sysfs file
Now that alarms are emulated, remove the irq sysfs file that could be used to send alarms. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
1 parent 8be0902 commit 696fa1d

File tree

1 file changed

+0
-39
lines changed

1 file changed

+0
-39
lines changed

drivers/rtc/rtc-test.c

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -110,37 +110,6 @@ static void test_rtc_alarm_handler(struct timer_list *t)
110110
rtc_update_irq(rtd->rtc, 1, RTC_AF | RTC_IRQF);
111111
}
112112

113-
static ssize_t test_irq_show(struct device *dev,
114-
struct device_attribute *attr, char *buf)
115-
{
116-
return sprintf(buf, "%d\n", 42);
117-
}
118-
static ssize_t test_irq_store(struct device *dev,
119-
struct device_attribute *attr,
120-
const char *buf, size_t count)
121-
{
122-
int retval;
123-
struct rtc_device *rtc = dev_get_drvdata(dev);
124-
125-
retval = count;
126-
if (strncmp(buf, "tick", 4) == 0 && rtc->pie_enabled)
127-
rtc_update_irq(rtc, 1, RTC_PF | RTC_IRQF);
128-
else if (strncmp(buf, "alarm", 5) == 0) {
129-
struct rtc_wkalrm alrm;
130-
int err = rtc_read_alarm(rtc, &alrm);
131-
132-
if (!err && alrm.enabled)
133-
rtc_update_irq(rtc, 1, RTC_AF | RTC_IRQF);
134-
135-
} else if (strncmp(buf, "update", 6) == 0 && rtc->uie_rtctimer.enabled)
136-
rtc_update_irq(rtc, 1, RTC_UF | RTC_IRQF);
137-
else
138-
retval = -EINVAL;
139-
140-
return retval;
141-
}
142-
static DEVICE_ATTR(irq, S_IRUGO | S_IWUSR, test_irq_show, test_irq_store);
143-
144113
static int test_probe(struct platform_device *plat_dev)
145114
{
146115
struct rtc_test_data *rtd;
@@ -162,16 +131,8 @@ static int test_probe(struct platform_device *plat_dev)
162131
return 0;
163132
}
164133

165-
static int test_remove(struct platform_device *plat_dev)
166-
{
167-
device_remove_file(&plat_dev->dev, &dev_attr_irq);
168-
169-
return 0;
170-
}
171-
172134
static struct platform_driver test_driver = {
173135
.probe = test_probe,
174-
.remove = test_remove,
175136
.driver = {
176137
.name = "rtc-test",
177138
},

0 commit comments

Comments
 (0)