mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-21 03:33:59 +08:00
net: phy: adin: remove the use of the .ack_interrupt()
In preparation of removing the .ack_interrupt() callback, we must replace its occurrences (aka phy_clear_interrupt), from the 2 places where it is called from (phy_enable_interrupts and phy_disable_interrupts), with equivalent functionality. This means that clearing interrupts now becomes something that the PHY driver is responsible of doing, before enabling interrupts and after clearing them. Make this driver follow the new contract. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Acked-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
parent
66d7439e83
commit
1d8300d3ce
@ -471,12 +471,25 @@ static int adin_phy_ack_intr(struct phy_device *phydev)
|
||||
|
||||
static int adin_phy_config_intr(struct phy_device *phydev)
|
||||
{
|
||||
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
||||
return phy_set_bits(phydev, ADIN1300_INT_MASK_REG,
|
||||
ADIN1300_INT_MASK_EN);
|
||||
int err;
|
||||
|
||||
return phy_clear_bits(phydev, ADIN1300_INT_MASK_REG,
|
||||
ADIN1300_INT_MASK_EN);
|
||||
if (phydev->interrupts == PHY_INTERRUPT_ENABLED) {
|
||||
err = adin_phy_ack_intr(phydev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = phy_set_bits(phydev, ADIN1300_INT_MASK_REG,
|
||||
ADIN1300_INT_MASK_EN);
|
||||
} else {
|
||||
err = phy_clear_bits(phydev, ADIN1300_INT_MASK_REG,
|
||||
ADIN1300_INT_MASK_EN);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = adin_phy_ack_intr(phydev);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
static irqreturn_t adin_phy_handle_interrupt(struct phy_device *phydev)
|
||||
@ -895,7 +908,6 @@ static struct phy_driver adin_driver[] = {
|
||||
.read_status = adin_read_status,
|
||||
.get_tunable = adin_get_tunable,
|
||||
.set_tunable = adin_set_tunable,
|
||||
.ack_interrupt = adin_phy_ack_intr,
|
||||
.config_intr = adin_phy_config_intr,
|
||||
.handle_interrupt = adin_phy_handle_interrupt,
|
||||
.get_sset_count = adin_get_sset_count,
|
||||
@ -919,7 +931,6 @@ static struct phy_driver adin_driver[] = {
|
||||
.read_status = adin_read_status,
|
||||
.get_tunable = adin_get_tunable,
|
||||
.set_tunable = adin_set_tunable,
|
||||
.ack_interrupt = adin_phy_ack_intr,
|
||||
.config_intr = adin_phy_config_intr,
|
||||
.handle_interrupt = adin_phy_handle_interrupt,
|
||||
.get_sset_count = adin_get_sset_count,
|
||||
|
Loading…
Reference in New Issue
Block a user