public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ACPI / APEI: use setup_deferrable_timer
@ 2017-03-11  0:46 Geliang Tang
  2017-03-14 18:06 ` Baicar, Tyler
  2017-04-18 14:41 ` Rafael J. Wysocki
  0 siblings, 2 replies; 4+ messages in thread
From: Geliang Tang @ 2017-03-11  0:46 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Borislav Petkov
  Cc: Geliang Tang, linux-acpi, linux-kernel

Use setup_deferrable_timer() instead of init_timer_deferrable() to
simplify the code.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 drivers/acpi/apei/ghes.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index b192b42..33ca196 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -1005,9 +1005,8 @@ static int ghes_probe(struct platform_device *ghes_dev)
 
 	switch (generic->notify.type) {
 	case ACPI_HEST_NOTIFY_POLLED:
-		ghes->timer.function = ghes_poll_func;
-		ghes->timer.data = (unsigned long)ghes;
-		init_timer_deferrable(&ghes->timer);
+		setup_deferrable_timer(&ghes->timer, ghes_poll_func,
+				       (unsigned long)ghes);
 		ghes_add_timer(ghes);
 		break;
 	case ACPI_HEST_NOTIFY_EXTERNAL:
-- 
2.9.3


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-04-18 17:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-11  0:46 [PATCH] ACPI / APEI: use setup_deferrable_timer Geliang Tang
2017-03-14 18:06 ` Baicar, Tyler
2017-04-18 14:41 ` Rafael J. Wysocki
2017-04-18 17:21   ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox