OSDN Git Service

net: phy: remove PM ops from MDIO bus
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 2 Jun 2018 20:37:24 +0000 (22:37 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 5 Jun 2018 12:50:16 +0000 (08:50 -0400)
commit9107c05e2e55c1c7abd02ab38f7694e0da08b643
tree9a3188f34ac7db2ee7c749a80fc6beb40060950c
parent7f4828ff27d4c92280222f6427981052fd3319e9
net: phy: remove PM ops from MDIO bus

Current implementation of MDIO bus PM ops doesn't actually implement
bus-specific PM ops but just calls PM ops defined on a device level
what doesn't seem to be fully in line with the core PM model.

When looking e.g. at __device_suspend() the PM core looks for PM ops
of a device in a specific order:
1. device PM domain
2. device type
3. device class
4. device bus

I think it has good reason that there's no PM ops on device level.

Now that a device type representation of PHY's as special type of MDIO
devices was added (only user of MDIO bus PM ops), the MDIO bus
PM ops can be removed including member pm of struct mdio_device.

If for some other type of MDIO device PM ops are needed, it should be
modeled as struct device_type as well.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mdio_bus.c
include/linux/mdio.h