diff options
author | Jonas Gorski <jogo@openwrt.org> | 2013-02-04 10:19:55 +0000 |
---|---|---|
committer | Jonas Gorski <jogo@openwrt.org> | 2013-02-04 10:19:55 +0000 |
commit | 8506964e6d6f89ae67951d0eafe4717b63b1f610 (patch) | |
tree | a60f167fa77a88974c7304c47fd3c0a29a43505e /target/linux/brcm63xx/patches-3.8/412-bcm63xx_enet-use-resource_size.patch | |
parent | 3b4fced67dad0b733d77f78205cfecfc0d654695 (diff) | |
download | upstream-8506964e6d6f89ae67951d0eafe4717b63b1f610.tar.gz upstream-8506964e6d6f89ae67951d0eafe4717b63b1f610.tar.bz2 upstream-8506964e6d6f89ae67951d0eafe4717b63b1f610.zip |
bcm63xx: add support for linux 3.8
Based on 3.8-rc6
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 35482
Diffstat (limited to 'target/linux/brcm63xx/patches-3.8/412-bcm63xx_enet-use-resource_size.patch')
-rw-r--r-- | target/linux/brcm63xx/patches-3.8/412-bcm63xx_enet-use-resource_size.patch | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/target/linux/brcm63xx/patches-3.8/412-bcm63xx_enet-use-resource_size.patch b/target/linux/brcm63xx/patches-3.8/412-bcm63xx_enet-use-resource_size.patch new file mode 100644 index 0000000000..ab5971751f --- /dev/null +++ b/target/linux/brcm63xx/patches-3.8/412-bcm63xx_enet-use-resource_size.patch @@ -0,0 +1,69 @@ +From dbd9b51204aa4114756b8659e180139ef3878032 Mon Sep 17 00:00:00 2001 +From: Maxime Bizon <mbizon@freebox.fr> +Date: Thu, 21 Jan 2010 17:28:36 +0100 +Subject: [PATCH 28/63] bcm63xx_enet: use resource_size(). + +--- + drivers/net/ethernet/broadcom/bcm63xx_enet.c | 18 ++++++++---------- + 1 files changed, 8 insertions(+), 10 deletions(-) + +--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c ++++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c +@@ -1594,7 +1594,6 @@ static int bcm_enet_probe(struct platfor + struct resource *res_mem, *res_irq, *res_irq_rx, *res_irq_tx; + struct mii_bus *bus; + const char *clk_name; +- unsigned int iomem_size; + int i, ret; + + /* stop if shared driver failed, assume driver->probe will be +@@ -1619,13 +1618,13 @@ static int bcm_enet_probe(struct platfor + if (ret) + goto out; + +- iomem_size = resource_size(res_mem); +- if (!request_mem_region(res_mem->start, iomem_size, "bcm63xx_enet")) { ++ if (!request_mem_region(res_mem->start, resource_size(res_mem), ++ "bcm63xx_enet")) { + ret = -EBUSY; + goto out; + } + +- priv->base = ioremap(res_mem->start, iomem_size); ++ priv->base = ioremap(res_mem->start, resource_size(res_mem)); + if (priv->base == NULL) { + ret = -ENOMEM; + goto out_release_mem; +@@ -1831,7 +1830,7 @@ out_unmap: + iounmap(priv->base); + + out_release_mem: +- release_mem_region(res_mem->start, iomem_size); ++ release_mem_region(res_mem->start, resource_size(res_mem)); + out: + free_netdev(dev); + return ret; +@@ -1903,19 +1902,18 @@ struct platform_driver bcm63xx_enet_driv + static int bcm_enet_shared_probe(struct platform_device *pdev) + { + struct resource *res; +- unsigned int iomem_size; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + if (!res) + return -ENODEV; + +- iomem_size = resource_size(res); +- if (!request_mem_region(res->start, iomem_size, "bcm63xx_enet_dma")) ++ if (!request_mem_region(res->start, resource_size(res), ++ "bcm63xx_enet_dma")) + return -EBUSY; + +- bcm_enet_shared_base = ioremap(res->start, iomem_size); ++ bcm_enet_shared_base = ioremap(res->start, resource_size(res)); + if (!bcm_enet_shared_base) { +- release_mem_region(res->start, iomem_size); ++ release_mem_region(res->start, resource_size(res)); + return -ENOMEM; + } + return 0; |