[PATCH v2 05/11] net: phy: add phydev_{err,err_probe,info,warn,dbg} macros
Marco Felsch
m.felsch at pengutronix.de
Fri Aug 11 03:26:51 PDT 2023
Import Linux macros to make it easier to port drivers to barebox.
Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
---
v2:
- add afa's rb
include/linux/phy.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/include/linux/phy.h b/include/linux/phy.h
index fee3868d38f9..8b52c16bb228 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -417,6 +417,21 @@ static inline bool phy_acquired(struct phy_device *phydev)
return phydev && phydev->bus && slice_acquired(&phydev->bus->slice);
}
+#define phydev_err(_phydev, format, args...) \
+ dev_err(&_phydev->dev, format, ##args)
+
+#define phydev_err_probe(_phydev, err, format, args...) \
+ dev_err_probe(&_phydev->dev, err, format, ##args)
+
+#define phydev_info(_phydev, format, args...) \
+ dev_info(&_phydev->dev, format, ##args)
+
+#define phydev_warn(_phydev, format, args...) \
+ dev_warn(&_phydev->dev, format, ##args)
+
+#define phydev_dbg(_phydev, format, args...) \
+ dev_dbg(&_phydev->dev, format, ##args)
+
#ifdef CONFIG_PHYLIB
int phy_register_fixup_for_uid(u32 phy_uid, u32 phy_uid_mask,
int (*run)(struct phy_device *));
--
2.39.2
More information about the barebox
mailing list