projects
/
openwrt
/
openwrt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
oxnas: remove support for pre-4.4 kernels from drivers
[openwrt/openwrt.git]
/
target
/
linux
/
oxnas
/
files
/
drivers
/
net
/
ethernet
/
stmicro
/
stmmac
/
dwmac-oxnas.c
diff --git
a/target/linux/oxnas/files/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c
b/target/linux/oxnas/files/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c
index 07f9f44497bd1dfa624b2fff970dca879ef1014d..aafb11814493dae54d7f5e515dd379e78ec29a0b 100644
(file)
--- a/
target/linux/oxnas/files/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c
+++ b/
target/linux/oxnas/files/drivers/net/ethernet/stmicro/stmmac/dwmac-oxnas.c
@@
-25,7
+25,6
@@
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/stmmac.h>
#include <linux/regmap.h>
#include <linux/reset.h>
#include <linux/stmmac.h>
-#include <linux/version.h>
#include <mach/hardware.h>
#include <mach/hardware.h>
@@
-92,37
+91,21
@@
static void oxnas_gmac_exit(struct platform_device *pdev, void *priv)
}
}
}
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
-static void *oxnas_gmac_probe(struct platform_device *pdev)
-{
-#else
static int oxnas_gmac_probe(struct platform_device *pdev)
{
struct plat_stmmacenet_data *plat_dat;
struct stmmac_resources stmmac_res;
int ret;
static int oxnas_gmac_probe(struct platform_device *pdev)
{
struct plat_stmmacenet_data *plat_dat;
struct stmmac_resources stmmac_res;
int ret;
-#endif
struct device *dev = &pdev->dev;
struct oxnas_gmac *bsp_priv;
bsp_priv = devm_kzalloc(dev, sizeof(*bsp_priv), GFP_KERNEL);
if (!bsp_priv)
struct device *dev = &pdev->dev;
struct oxnas_gmac *bsp_priv;
bsp_priv = devm_kzalloc(dev, sizeof(*bsp_priv), GFP_KERNEL);
if (!bsp_priv)
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- return ERR_PTR(-ENOMEM);
-#else
return -ENOMEM;
return -ENOMEM;
-#endif
bsp_priv->clk = devm_clk_get(dev, "gmac");
if (IS_ERR(bsp_priv->clk))
bsp_priv->clk = devm_clk_get(dev, "gmac");
if (IS_ERR(bsp_priv->clk))
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- return bsp_priv->clk;
-#else
return PTR_ERR(bsp_priv->clk);
return PTR_ERR(bsp_priv->clk);
-#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
- return bsp_priv;
-#else
ret = stmmac_get_platform_resources(pdev, &stmmac_res);
if (ret)
return ret;
ret = stmmac_get_platform_resources(pdev, &stmmac_res);
if (ret)
return ret;
@@
-140,17
+123,8
@@
static int oxnas_gmac_probe(struct platform_device *pdev)
return ret;
return stmmac_dvr_probe(dev, plat_dat, &stmmac_res);
return ret;
return stmmac_dvr_probe(dev, plat_dat, &stmmac_res);
-#endif
}
}
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4,2,0)
-const struct stmmac_of_data oxnas_gmac_data = {
- .has_gmac = 1,
- .setup = oxnas_gmac_probe,
- .init = oxnas_gmac_init,
- .exit = oxnas_gmac_exit,
-};
-#else
static const struct of_device_id oxnas_gmac_match[] = {
{ .compatible = "plxtech,nas782x-gmac" },
{ }
static const struct of_device_id oxnas_gmac_match[] = {
{ .compatible = "plxtech,nas782x-gmac" },
{ }
@@
-167,6
+141,5
@@
static struct platform_driver oxnas_gmac_driver = {
},
};
module_platform_driver(oxnas_gmac_driver);
},
};
module_platform_driver(oxnas_gmac_driver);
-#endif
MODULE_LICENSE("GPL v2");
MODULE_LICENSE("GPL v2");