From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: linux-rtc@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
Alexandre Belloni <alexandre.belloni@bootlin.com>
Subject: [PATCH 5/5] rtc: test: remove irq sysfs file
Date: Thu, 31 May 2018 23:09:59 +0200 [thread overview]
Message-ID: <20180531210959.2472-5-alexandre.belloni@bootlin.com> (raw)
In-Reply-To: <20180531210959.2472-1-alexandre.belloni@bootlin.com>
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>
---
drivers/rtc/rtc-test.c | 39 ---------------------------------------
1 file changed, 39 deletions(-)
diff --git a/drivers/rtc/rtc-test.c b/drivers/rtc/rtc-test.c
index 975f6cdda73f..fbcec4a2e3c9 100644
--- a/drivers/rtc/rtc-test.c
+++ b/drivers/rtc/rtc-test.c
@@ -110,37 +110,6 @@ static void test_rtc_alarm_handler(struct timer_list *t)
rtc_update_irq(rtd->rtc, 1, RTC_AF | RTC_IRQF);
}
-static ssize_t test_irq_show(struct device *dev,
- struct device_attribute *attr, char *buf)
-{
- return sprintf(buf, "%d\n", 42);
-}
-static ssize_t test_irq_store(struct device *dev,
- struct device_attribute *attr,
- const char *buf, size_t count)
-{
- int retval;
- struct rtc_device *rtc = dev_get_drvdata(dev);
-
- retval = count;
- if (strncmp(buf, "tick", 4) == 0 && rtc->pie_enabled)
- rtc_update_irq(rtc, 1, RTC_PF | RTC_IRQF);
- else if (strncmp(buf, "alarm", 5) == 0) {
- struct rtc_wkalrm alrm;
- int err = rtc_read_alarm(rtc, &alrm);
-
- if (!err && alrm.enabled)
- rtc_update_irq(rtc, 1, RTC_AF | RTC_IRQF);
-
- } else if (strncmp(buf, "update", 6) == 0 && rtc->uie_rtctimer.enabled)
- rtc_update_irq(rtc, 1, RTC_UF | RTC_IRQF);
- else
- retval = -EINVAL;
-
- return retval;
-}
-static DEVICE_ATTR(irq, S_IRUGO | S_IWUSR, test_irq_show, test_irq_store);
-
static int test_probe(struct platform_device *plat_dev)
{
struct rtc_test_data *rtd;
@@ -162,16 +131,8 @@ static int test_probe(struct platform_device *plat_dev)
return 0;
}
-static int test_remove(struct platform_device *plat_dev)
-{
- device_remove_file(&plat_dev->dev, &dev_attr_irq);
-
- return 0;
-}
-
static struct platform_driver test_driver = {
.probe = test_probe,
- .remove = test_remove,
.driver = {
.name = "rtc-test",
},
--
2.17.0
prev parent reply other threads:[~2018-05-31 21:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-31 21:09 [PATCH 1/5] rtc: test: remove useless proc info Alexandre Belloni
2018-05-31 21:09 ` [PATCH 2/5] rtc: test: allow registering many devices Alexandre Belloni
2018-05-31 21:09 ` [PATCH 3/5] rtc: test: store time as an offset to system time Alexandre Belloni
2018-05-31 21:09 ` [PATCH 4/5] rtc: test: emulate alarms using timers Alexandre Belloni
2018-05-31 21:09 ` Alexandre Belloni [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180531210959.2472-5-alexandre.belloni@bootlin.com \
--to=alexandre.belloni@bootlin.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).