projects
/
linux-2.6-microblaze.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cb9b902
)
dsa: mv88e6xxx: Initialise the mutex as soon as it is created
author
Andrew Lunn
<andrew@lunn.ch>
Tue, 10 May 2016 21:27:19 +0000
(23:27 +0200)
committer
David S. Miller
<davem@davemloft.net>
Wed, 11 May 2016 23:36:28 +0000
(19:36 -0400)
By initialising immediately it, we don't run the danger of using it
before it is initialised.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx.c
patch
|
blob
|
history
diff --git
a/drivers/net/dsa/mv88e6xxx.c
b/drivers/net/dsa/mv88e6xxx.c
index
835126e
..
46564f4
100644
(file)
--- a/
drivers/net/dsa/mv88e6xxx.c
+++ b/
drivers/net/dsa/mv88e6xxx.c
@@
-3132,8
+3132,6
@@
static int mv88e6xxx_setup(struct dsa_switch *ds)
ps->ds = ds;
- mutex_init(&ps->smi_mutex);
-
INIT_WORK(&ps->bridge_work, mv88e6xxx_bridge_work);
if (mv88e6xxx_has(ps, MV88E6XXX_FLAG_EEPROM))
@@
-3580,6
+3578,7
@@
static const char *mv88e6xxx_probe(struct device *dsa_dev,
ps->bus = bus;
ps->sw_addr = sw_addr;
ps->info = info;
+ mutex_init(&ps->smi_mutex);
*priv = ps;