diff options
Diffstat (limited to 'drivers/net/dsa/microchip/ksz_common.c')
-rw-r--r-- | drivers/net/dsa/microchip/ksz_common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c index 54e0ca6ed730..86b6464b4525 100644 --- a/drivers/net/dsa/microchip/ksz_common.c +++ b/drivers/net/dsa/microchip/ksz_common.c | |||
@@ -1117,11 +1117,6 @@ static int ksz_switch_init(struct ksz_device *dev) | |||
1117 | { | 1117 | { |
1118 | int i; | 1118 | int i; |
1119 | 1119 | ||
1120 | mutex_init(&dev->reg_mutex); | ||
1121 | mutex_init(&dev->stats_mutex); | ||
1122 | mutex_init(&dev->alu_mutex); | ||
1123 | mutex_init(&dev->vlan_mutex); | ||
1124 | |||
1125 | dev->ds->ops = &ksz_switch_ops; | 1120 | dev->ds->ops = &ksz_switch_ops; |
1126 | 1121 | ||
1127 | for (i = 0; i < ARRAY_SIZE(ksz_switch_chips); i++) { | 1122 | for (i = 0; i < ARRAY_SIZE(ksz_switch_chips); i++) { |
@@ -1206,6 +1201,11 @@ int ksz_switch_register(struct ksz_device *dev) | |||
1206 | if (dev->pdata) | 1201 | if (dev->pdata) |
1207 | dev->chip_id = dev->pdata->chip_id; | 1202 | dev->chip_id = dev->pdata->chip_id; |
1208 | 1203 | ||
1204 | mutex_init(&dev->reg_mutex); | ||
1205 | mutex_init(&dev->stats_mutex); | ||
1206 | mutex_init(&dev->alu_mutex); | ||
1207 | mutex_init(&dev->vlan_mutex); | ||
1208 | |||
1209 | if (ksz_switch_detect(dev)) | 1209 | if (ksz_switch_detect(dev)) |
1210 | return -EINVAL; | 1210 | return -EINVAL; |
1211 | 1211 | ||