* [PATCH -next] net: dsa: mv88e6xxx: use setup_timer to simplify the code
@ 2016-10-22 14:28 Wei Yongjun
2016-10-23 15:54 ` Andrew Lunn
0 siblings, 1 reply; 2+ messages in thread
From: Wei Yongjun @ 2016-10-22 14:28 UTC (permalink / raw)
To: Andrew Lunn, Vivien Didelot, Florian Fainelli; +Cc: Wei Yongjun, netdev
From: Wei Yongjun <weiyongjun1@huawei.com>
Use setup_timer function instead of initializing timer with the function
and data fields.
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
drivers/net/dsa/mv88e6xxx/chip.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/net/dsa/mv88e6xxx/chip.c b/drivers/net/dsa/mv88e6xxx/chip.c
index ac03297..52d29b8 100644
--- a/drivers/net/dsa/mv88e6xxx/chip.c
+++ b/drivers/net/dsa/mv88e6xxx/chip.c
@@ -639,9 +639,8 @@ static void mv88e6xxx_ppu_state_init(struct mv88e6xxx_chip *chip)
{
mutex_init(&chip->ppu_mutex);
INIT_WORK(&chip->ppu_work, mv88e6xxx_ppu_reenable_work);
- init_timer(&chip->ppu_timer);
- chip->ppu_timer.data = (unsigned long)chip;
- chip->ppu_timer.function = mv88e6xxx_ppu_reenable_timer;
+ setup_timer(&chip->ppu_timer, mv88e6xxx_ppu_reenable_timer,
+ (unsigned long)chip);
}
static void mv88e6xxx_ppu_state_destroy(struct mv88e6xxx_chip *chip)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -next] net: dsa: mv88e6xxx: use setup_timer to simplify the code
2016-10-22 14:28 [PATCH -next] net: dsa: mv88e6xxx: use setup_timer to simplify the code Wei Yongjun
@ 2016-10-23 15:54 ` Andrew Lunn
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2016-10-23 15:54 UTC (permalink / raw)
To: Wei Yongjun; +Cc: Vivien Didelot, Florian Fainelli, Wei Yongjun, netdev
On Sat, Oct 22, 2016 at 02:28:00PM +0000, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Use setup_timer function instead of initializing timer with the function
> and data fields.
>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-10-23 15:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-22 14:28 [PATCH -next] net: dsa: mv88e6xxx: use setup_timer to simplify the code Wei Yongjun
2016-10-23 15:54 ` Andrew Lunn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.