diff mbox series

atm: lanai: use setup_timer instead of init_timer

Message ID 20171124132712.31882-1-colin.king@canonical.com
State Not Applicable, archived
Delegated to: David Miller
Headers show
Series atm: lanai: use setup_timer instead of init_timer | expand

Commit Message

Colin Ian King Nov. 24, 2017, 1:27 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

Use setup_timer function instead of initializing timer with the
function and data fields.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 drivers/atm/lanai.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

David Miller Nov. 30, 2017, 2:23 p.m. UTC | #1
From: Colin King <colin.king@canonical.com>
Date: Fri, 24 Nov 2017 13:27:12 +0000

> From: Colin Ian King <colin.king@canonical.com>
> 
> Use setup_timer function instead of initializing timer with the
> function and data fields.
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>

setup_timer() == -ENOEXIST.
Colin Ian King Nov. 30, 2017, 2:30 p.m. UTC | #2
On 30/11/17 14:23, David Miller wrote:
> From: Colin King <colin.king@canonical.com>
> Date: Fri, 24 Nov 2017 13:27:12 +0000
> 
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> Use setup_timer function instead of initializing timer with the
>> function and data fields.
>>
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> 
> setup_timer() == -ENOEXIST.
> --
> To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

Apologies. My bad.

Colin
diff mbox series

Patch

diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c
index 2351dad78ff5..87e8b5dfac39 100644
--- a/drivers/atm/lanai.c
+++ b/drivers/atm/lanai.c
@@ -1790,10 +1790,8 @@  static void lanai_timed_poll(unsigned long arg)
 
 static inline void lanai_timed_poll_start(struct lanai_dev *lanai)
 {
-	init_timer(&lanai->timer);
+	setup_timer(&lanai->timer, lanai_timed_poll, (unsigned long)lanai);
 	lanai->timer.expires = jiffies + LANAI_POLL_PERIOD;
-	lanai->timer.data = (unsigned long) lanai;
-	lanai->timer.function = lanai_timed_poll;
 	add_timer(&lanai->timer);
 }