diff options
author | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-05-19 18:32:13 +0000 |
---|---|---|
committer | jogo <jogo@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-05-19 18:32:13 +0000 |
commit | f6a2f33347da35ced5d08990c3bdc086c97b11c7 (patch) | |
tree | 1462b284b9bb6c1b3416a7de0ddd35dab51959c3 /target/linux/brcm63xx/patches-3.9/020-bcm63xx_enet-use-managed-memory-allocations.patch | |
parent | 2ce30d075aab8baa7aae7ac3d58e46690e02f282 (diff) |
bcm63xx: add 3.9 support
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36660 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/brcm63xx/patches-3.9/020-bcm63xx_enet-use-managed-memory-allocations.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.9/020-bcm63xx_enet-use-managed-memory-allocations.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.9/020-bcm63xx_enet-use-managed-memory-allocations.patch b/target/linux/brcm63xx/patches-3.9/020-bcm63xx_enet-use-managed-memory-allocations.patch new file mode 100644 index 000000000..d121fce15 --- /dev/null +++ b/target/linux/brcm63xx/patches-3.9/020-bcm63xx_enet-use-managed-memory-allocations.patch @@ -0,0 +1,42 @@ +From 451a609ca472f80838df056689359c5486d832c1 Mon Sep 17 00:00:00 2001 +From: Jonas Gorski <jogo@openwrt.org> +Date: Sun, 10 Mar 2013 14:05:01 +0100 +Subject: [PATCH 2/3] bcm63xx_enet: use managed memory allocations + +Signed-off-by: Jonas Gorski <jogo@openwrt.org> +--- + drivers/net/ethernet/broadcom/bcm63xx_enet.c | 8 +++----- + 1 file changed, 3 insertions(+), 5 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c +@@ -1727,7 +1727,8 @@ static int bcm_enet_probe(struct platfor + * if a slave is not present on hw */ + bus->phy_mask = ~(1 << priv->phy_id); + +- bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL); ++ bus->irq = devm_kzalloc(&pdev->dev, sizeof(int) * PHY_MAX_ADDR, ++ GFP_KERNEL); + if (!bus->irq) { + ret = -ENOMEM; + goto out_free_mdio; +@@ -1788,10 +1789,8 @@ static int bcm_enet_probe(struct platfor + return 0; + + out_unregister_mdio: +- if (priv->mii_bus) { ++ if (priv->mii_bus) + mdiobus_unregister(priv->mii_bus); +- kfree(priv->mii_bus->irq); +- } + + out_free_mdio: + if (priv->mii_bus) +@@ -1832,7 +1831,6 @@ static int bcm_enet_remove(struct platfo + + if (priv->has_phy) { + mdiobus_unregister(priv->mii_bus); +- kfree(priv->mii_bus->irq); + mdiobus_free(priv->mii_bus); + } else { + struct bcm63xx_enet_platform_data *pd; |