aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@nbd.name>2018-03-23 13:40:41 +0100
committerFelix Fietkau <nbd@nbd.name>2018-03-23 20:56:34 +0100
commita276002079d4475a902d0201cbc68c4bd879a7ee (patch)
tree956a79f4731560a427aae96a8dddf0ae9d2d56cf /target/linux/ramips
parent147b6798916d80ba6fb54cf909122ceb8e4fa09f (diff)
downloadupstream-a276002079d4475a902d0201cbc68c4bd879a7ee.tar.gz
upstream-a276002079d4475a902d0201cbc68c4bd879a7ee.tar.bz2
upstream-a276002079d4475a902d0201cbc68c4bd879a7ee.zip
ramips: remove dead (and potentially crashy) code in mt7621 gsw init
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/ramips')
-rw-r--r--target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/gsw_mt7621.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/gsw_mt7621.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/gsw_mt7621.c
index c9fea0caa2..9d5fe6efee 100644
--- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/gsw_mt7621.c
+++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mtk/gsw_mt7621.c
@@ -238,9 +238,7 @@ int mtk_gsw_init(struct fe_priv *priv)
static int mt7621_gsw_probe(struct platform_device *pdev)
{
struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- const char *port4 = NULL;
struct mt7620_gsw *gsw;
- struct device_node *np;
gsw = devm_kzalloc(&pdev->dev, sizeof(struct mt7620_gsw), GFP_KERNEL);
if (!gsw)
@@ -251,15 +249,6 @@ static int mt7621_gsw_probe(struct platform_device *pdev)
return -EADDRNOTAVAIL;
gsw->dev = &pdev->dev;
-
- of_property_read_string(np, "mediatek,port4", &port4);
- if (port4 && !strcmp(port4, "ephy"))
- gsw->port4 = PORT4_EPHY;
- else if (port4 && !strcmp(port4, "gmac"))
- gsw->port4 = PORT4_EXT;
- else
- gsw->port4 = PORT4_EPHY;
-
gsw->irq = platform_get_irq(pdev, 0);
platform_set_drvdata(pdev, gsw);