Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933518AbdCKArS (ORCPT ); Fri, 10 Mar 2017 19:47:18 -0500 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34397 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932599AbdCKArJ (ORCPT ); Fri, 10 Mar 2017 19:47:09 -0500 From: Geliang Tang To: "Rafael J. Wysocki" , Len Brown , Borislav Petkov Cc: Geliang Tang , linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] ACPI / APEI: use setup_deferrable_timer Date: Sat, 11 Mar 2017 08:46:55 +0800 Message-Id: <3afa5498142ef68256023257dad37b9f8352e65e.1489060803.git.geliangtang@gmail.com> X-Mailer: git-send-email 2.9.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 826 Lines: 26 Use setup_deferrable_timer() instead of init_timer_deferrable() to simplify the code. Signed-off-by: Geliang Tang --- 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