|
21 | 21 | #include <linux/irqchip/chained_irq.h> |
22 | 22 | #include <linux/of_irq.h> |
23 | 23 | #include <linux/regmap.h> |
| 24 | +#include <linux/string_choices.h> |
24 | 25 |
|
25 | 26 | #include "realtek.h" |
26 | 27 | #include "realtek-smi.h" |
@@ -1522,7 +1523,7 @@ static int rtl8366rb_vlan_filtering(struct dsa_switch *ds, int port, |
1522 | 1523 | rb = priv->chip_data; |
1523 | 1524 |
|
1524 | 1525 | dev_dbg(priv->dev, "port %d: %s VLAN filtering\n", port, |
1525 | | - vlan_filtering ? "enable" : "disable"); |
| 1526 | + str_enable_disable(vlan_filtering)); |
1526 | 1527 |
|
1527 | 1528 | /* If the port is not in the member set, the frame will be dropped */ |
1528 | 1529 | ret = regmap_update_bits(priv->map, RTL8366RB_VLAN_INGRESS_CTRL2_REG, |
@@ -1884,15 +1885,15 @@ static bool rtl8366rb_is_vlan_valid(struct realtek_priv *priv, unsigned int vlan |
1884 | 1885 |
|
1885 | 1886 | static int rtl8366rb_enable_vlan(struct realtek_priv *priv, bool enable) |
1886 | 1887 | { |
1887 | | - dev_dbg(priv->dev, "%s VLAN\n", enable ? "enable" : "disable"); |
| 1888 | + dev_dbg(priv->dev, "%s VLAN\n", str_enable_disable(enable)); |
1888 | 1889 | return regmap_update_bits(priv->map, |
1889 | 1890 | RTL8366RB_SGCR, RTL8366RB_SGCR_EN_VLAN, |
1890 | 1891 | enable ? RTL8366RB_SGCR_EN_VLAN : 0); |
1891 | 1892 | } |
1892 | 1893 |
|
1893 | 1894 | static int rtl8366rb_enable_vlan4k(struct realtek_priv *priv, bool enable) |
1894 | 1895 | { |
1895 | | - dev_dbg(priv->dev, "%s VLAN 4k\n", enable ? "enable" : "disable"); |
| 1896 | + dev_dbg(priv->dev, "%s VLAN 4k\n", str_enable_disable(enable)); |
1896 | 1897 | return regmap_update_bits(priv->map, RTL8366RB_SGCR, |
1897 | 1898 | RTL8366RB_SGCR_EN_VLAN_4KTB, |
1898 | 1899 | enable ? RTL8366RB_SGCR_EN_VLAN_4KTB : 0); |
|
0 commit comments