projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1aaa87a
)
net: dsa: mv88e6xxx: use setup_timer to simplify the code
author
Wei Yongjun
<
[email protected]
>
Sat, 22 Oct 2016 14:28:00 +0000
(14:28 +0000)
committer
David S. Miller
<
[email protected]
>
Wed, 26 Oct 2016 21:21:59 +0000
(17:21 -0400)
Use setup_timer function instead of initializing timer with the function
and data fields.
Signed-off-by: Wei Yongjun <
[email protected]
>
Reviewed-by: Andrew Lunn <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/dsa/mv88e6xxx/chip.c
patch
|
blob
|
history
diff --git
a/drivers/net/dsa/mv88e6xxx/chip.c
b/drivers/net/dsa/mv88e6xxx/chip.c
index 157360f250695bd083148969e8c08bbed23b9dd8..72b9dac29901b7772ff87795a44dcdb724ecd268 100644
(file)
--- 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)