File tree Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Expand file tree Collapse file tree 2 files changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -45,10 +45,7 @@ struct mdio_device {
45
45
unsigned int reset_deassert_delay ;
46
46
};
47
47
48
- static inline struct mdio_device * to_mdio_device (const struct device * dev )
49
- {
50
- return container_of (dev , struct mdio_device , dev );
51
- }
48
+ #define to_mdio_device (__dev ) container_of_const(__dev, struct mdio_device, dev)
52
49
53
50
/* struct mdio_driver_common: Common to all MDIO drivers */
54
51
struct mdio_driver_common {
Original file line number Diff line number Diff line change @@ -744,10 +744,7 @@ struct phy_device {
744
744
#define PHY_F_NO_IRQ 0x80000000
745
745
#define PHY_F_RXC_ALWAYS_ON 0x40000000
746
746
747
- static inline struct phy_device * to_phy_device (const struct device * dev )
748
- {
749
- return container_of (to_mdio_device (dev ), struct phy_device , mdio );
750
- }
747
+ #define to_phy_device (__dev ) container_of_const(to_mdio_device(__dev), struct phy_device, mdio)
751
748
752
749
/**
753
750
* struct phy_tdr_config - Configuration of a TDR raw test
You can’t perform that action at this time.
0 commit comments