| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * Marvell 88e6xxx Ethernet switch PHY and PPU support |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (c) 2008 Marvell Semiconductor |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Copyright (c) 2017 Andrew Lunn <andrew@lunn.ch> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 9 | | - * it under the terms of the GNU General Public License as published by |
|---|
| 10 | | - * the Free Software Foundation; either version 2 of the License, or |
|---|
| 11 | | - * (at your option) any later version. |
|---|
| 12 | 8 | */ |
|---|
| 13 | 9 | |
|---|
| 14 | 10 | #include <linux/mdio.h> |
|---|
| .. | .. |
|---|
| 141 | 137 | |
|---|
| 142 | 138 | chip = container_of(ugly, struct mv88e6xxx_chip, ppu_work); |
|---|
| 143 | 139 | |
|---|
| 144 | | - mutex_lock(&chip->reg_lock); |
|---|
| 140 | + mv88e6xxx_reg_lock(chip); |
|---|
| 145 | 141 | |
|---|
| 146 | 142 | if (mutex_trylock(&chip->ppu_mutex)) { |
|---|
| 147 | 143 | if (mv88e6xxx_phy_ppu_enable(chip) == 0) |
|---|
| .. | .. |
|---|
| 149 | 145 | mutex_unlock(&chip->ppu_mutex); |
|---|
| 150 | 146 | } |
|---|
| 151 | 147 | |
|---|
| 152 | | - mutex_unlock(&chip->reg_lock); |
|---|
| 148 | + mv88e6xxx_reg_unlock(chip); |
|---|
| 153 | 149 | } |
|---|
| 154 | 150 | |
|---|
| 155 | 151 | static void mv88e6xxx_phy_ppu_reenable_timer(struct timer_list *t) |
|---|