mirror of
https://github.com/openwrt/openwrt.git
synced 2025-02-01 08:48:08 +00:00
generic: b53: rename exported symbols to avoid upstream conflict
Upstream DSA driver is exporting symbols with the same name as our downstream swconfig driver, so lets rename the downstream symbols to make them unique and avoid the conflict on 6.1 kernel. Without this change, building 6.1 with kmod-switch-bcm53xx would conflict with the B53 DSA driver and CI would fail. Signed-off-by: Robert Marko <robimarko@gmail.com> (cherry picked from commit effccdd444a956afc5493ef8f1c79a7e7ffa8490)
This commit is contained in:
parent
b1114c1a7a
commit
fc87a8f2ec
@ -1611,8 +1611,8 @@ static int b53_switch_init(struct b53_device *dev)
|
|||||||
return b53_switch_reset(dev);
|
return b53_switch_reset(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct b53_device *b53_switch_alloc(struct device *base, struct b53_io_ops *ops,
|
struct b53_device *b53_swconfig_switch_alloc(struct device *base, struct b53_io_ops *ops,
|
||||||
void *priv)
|
void *priv)
|
||||||
{
|
{
|
||||||
struct b53_device *dev;
|
struct b53_device *dev;
|
||||||
|
|
||||||
@ -1627,9 +1627,9 @@ struct b53_device *b53_switch_alloc(struct device *base, struct b53_io_ops *ops,
|
|||||||
|
|
||||||
return dev;
|
return dev;
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(b53_switch_alloc);
|
EXPORT_SYMBOL(b53_swconfig_switch_alloc);
|
||||||
|
|
||||||
int b53_switch_detect(struct b53_device *dev)
|
int b53_swconfig_switch_detect(struct b53_device *dev)
|
||||||
{
|
{
|
||||||
u32 id32;
|
u32 id32;
|
||||||
u16 tmp;
|
u16 tmp;
|
||||||
@ -1694,9 +1694,9 @@ int b53_switch_detect(struct b53_device *dev)
|
|||||||
return b53_read8(dev, B53_MGMT_PAGE, B53_REV_ID,
|
return b53_read8(dev, B53_MGMT_PAGE, B53_REV_ID,
|
||||||
&dev->core_rev);
|
&dev->core_rev);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(b53_switch_detect);
|
EXPORT_SYMBOL(b53_swconfig_switch_detect);
|
||||||
|
|
||||||
int b53_switch_register(struct b53_device *dev)
|
int b53_swconfig_switch_register(struct b53_device *dev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -1706,7 +1706,7 @@ int b53_switch_register(struct b53_device *dev)
|
|||||||
dev->sw_dev.alias = dev->pdata->alias;
|
dev->sw_dev.alias = dev->pdata->alias;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!dev->chip_id && b53_switch_detect(dev))
|
if (!dev->chip_id && b53_swconfig_switch_detect(dev))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
ret = b53_switch_init(dev);
|
ret = b53_switch_init(dev);
|
||||||
@ -1717,7 +1717,7 @@ int b53_switch_register(struct b53_device *dev)
|
|||||||
|
|
||||||
return register_switch(&dev->sw_dev, NULL);
|
return register_switch(&dev->sw_dev, NULL);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(b53_switch_register);
|
EXPORT_SYMBOL(b53_swconfig_switch_register);
|
||||||
|
|
||||||
MODULE_AUTHOR("Jonas Gorski <jogo@openwrt.org>");
|
MODULE_AUTHOR("Jonas Gorski <jogo@openwrt.org>");
|
||||||
MODULE_DESCRIPTION("B53 switch library");
|
MODULE_DESCRIPTION("B53 switch library");
|
||||||
|
@ -280,7 +280,7 @@ static int b53_phy_probe(struct phy_device *phydev)
|
|||||||
if (phydev->mdio.addr != B53_PSEUDO_PHY && phydev->mdio.addr != 0)
|
if (phydev->mdio.addr != B53_PSEUDO_PHY && phydev->mdio.addr != 0)
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
dev = b53_switch_alloc(&phydev->mdio.dev, &b53_mdio_ops, phydev->mdio.bus);
|
dev = b53_swconfig_switch_alloc(&phydev->mdio.dev, &b53_mdio_ops, phydev->mdio.bus);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
@ -290,7 +290,7 @@ static int b53_phy_probe(struct phy_device *phydev)
|
|||||||
dev->pdata = NULL;
|
dev->pdata = NULL;
|
||||||
mutex_init(&dev->reg_mutex);
|
mutex_init(&dev->reg_mutex);
|
||||||
|
|
||||||
ret = b53_switch_detect(dev);
|
ret = b53_swconfig_switch_detect(dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ static int b53_phy_probe(struct phy_device *phydev)
|
|||||||
|
|
||||||
linkmode_copy(phydev->advertising, phydev->supported);
|
linkmode_copy(phydev->advertising, phydev->supported);
|
||||||
|
|
||||||
ret = b53_switch_register(dev);
|
ret = b53_swconfig_switch_register(dev);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
dev_err(dev->dev, "failed to register switch: %i\n", ret);
|
dev_err(dev->dev, "failed to register switch: %i\n", ret);
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -205,7 +205,7 @@ static int b53_mmap_probe(struct platform_device *pdev)
|
|||||||
if (!pdata)
|
if (!pdata)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
dev = b53_switch_alloc(&pdev->dev, &b53_mmap_ops, pdata->regs);
|
dev = b53_swconfig_switch_alloc(&pdev->dev, &b53_mmap_ops, pdata->regs);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
@ -214,7 +214,7 @@ static int b53_mmap_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
platform_set_drvdata(pdev, dev);
|
platform_set_drvdata(pdev, dev);
|
||||||
|
|
||||||
return b53_switch_register(dev);
|
return b53_swconfig_switch_register(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int b53_mmap_remove(struct platform_device *pdev)
|
static int b53_mmap_remove(struct platform_device *pdev)
|
||||||
|
@ -183,12 +183,12 @@ static inline struct b53_device *sw_to_b53(struct switch_dev *sw)
|
|||||||
return container_of(sw, struct b53_device, sw_dev);
|
return container_of(sw, struct b53_device, sw_dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
struct b53_device *b53_switch_alloc(struct device *base, struct b53_io_ops *ops,
|
struct b53_device *b53_swconfig_switch_alloc(struct device *base, struct b53_io_ops *ops,
|
||||||
void *priv);
|
void *priv);
|
||||||
|
|
||||||
int b53_switch_detect(struct b53_device *dev);
|
int b53_swconfig_switch_detect(struct b53_device *dev);
|
||||||
|
|
||||||
int b53_switch_register(struct b53_device *dev);
|
int b53_swconfig_switch_register(struct b53_device *dev);
|
||||||
|
|
||||||
static inline void b53_switch_remove(struct b53_device *dev)
|
static inline void b53_switch_remove(struct b53_device *dev)
|
||||||
{
|
{
|
||||||
|
@ -288,14 +288,14 @@ static int b53_spi_probe(struct spi_device *spi)
|
|||||||
struct b53_device *dev;
|
struct b53_device *dev;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
dev = b53_switch_alloc(&spi->dev, &b53_spi_ops, spi);
|
dev = b53_swconfig_switch_alloc(&spi->dev, &b53_spi_ops, spi);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
if (spi->dev.platform_data)
|
if (spi->dev.platform_data)
|
||||||
dev->pdata = spi->dev.platform_data;
|
dev->pdata = spi->dev.platform_data;
|
||||||
|
|
||||||
ret = b53_switch_register(dev);
|
ret = b53_swconfig_switch_register(dev);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ static int b53_srab_probe(struct platform_device *pdev)
|
|||||||
if (!pdata)
|
if (!pdata)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
dev = b53_switch_alloc(&pdev->dev, &b53_srab_ops, pdata->regs);
|
dev = b53_swconfig_switch_alloc(&pdev->dev, &b53_srab_ops, pdata->regs);
|
||||||
if (!dev)
|
if (!dev)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
@ -351,7 +351,7 @@ static int b53_srab_probe(struct platform_device *pdev)
|
|||||||
|
|
||||||
platform_set_drvdata(pdev, dev);
|
platform_set_drvdata(pdev, dev);
|
||||||
|
|
||||||
return b53_switch_register(dev);
|
return b53_swconfig_switch_register(dev);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int b53_srab_remove(struct platform_device *pdev)
|
static int b53_srab_remove(struct platform_device *pdev)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user