diff options
author | David S. Miller <davem@davemloft.net> | 2014-12-10 15:48:20 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-12-10 15:48:20 -0500 |
commit | 22f10923dd39141785273e423b9acf347297e15f (patch) | |
tree | cc1f19103817433a426b3e329d6326f5e9d8e8f7 /drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | |
parent | 785c20a08bead1e58ad53f2dc324782da7a0c9ea (diff) | |
parent | 69204cf7eb9c5a72067ce6922d4699378251d053 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
drivers/net/ethernet/amd/xgbe/xgbe-desc.c
drivers/net/ethernet/renesas/sh_eth.c
Overlapping changes in both conflict cases.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index 07054ce84ba8..4032b170fe24 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | |||
@@ -276,6 +276,15 @@ static int stmmac_pltfr_probe(struct platform_device *pdev) | |||
276 | 276 | ||
277 | plat_dat = dev_get_platdata(&pdev->dev); | 277 | plat_dat = dev_get_platdata(&pdev->dev); |
278 | 278 | ||
279 | if (!plat_dat) | ||
280 | plat_dat = devm_kzalloc(&pdev->dev, | ||
281 | sizeof(struct plat_stmmacenet_data), | ||
282 | GFP_KERNEL); | ||
283 | if (!plat_dat) { | ||
284 | pr_err("%s: ERROR: no memory", __func__); | ||
285 | return -ENOMEM; | ||
286 | } | ||
287 | |||
279 | /* Set default value for multicast hash bins */ | 288 | /* Set default value for multicast hash bins */ |
280 | plat_dat->multicast_filter_bins = HASH_TABLE_SIZE; | 289 | plat_dat->multicast_filter_bins = HASH_TABLE_SIZE; |
281 | 290 | ||
@@ -283,15 +292,6 @@ static int stmmac_pltfr_probe(struct platform_device *pdev) | |||
283 | plat_dat->unicast_filter_entries = 1; | 292 | plat_dat->unicast_filter_entries = 1; |
284 | 293 | ||
285 | if (pdev->dev.of_node) { | 294 | if (pdev->dev.of_node) { |
286 | if (!plat_dat) | ||
287 | plat_dat = devm_kzalloc(&pdev->dev, | ||
288 | sizeof(struct plat_stmmacenet_data), | ||
289 | GFP_KERNEL); | ||
290 | if (!plat_dat) { | ||
291 | pr_err("%s: ERROR: no memory", __func__); | ||
292 | return -ENOMEM; | ||
293 | } | ||
294 | |||
295 | ret = stmmac_probe_config_dt(pdev, plat_dat, &mac); | 295 | ret = stmmac_probe_config_dt(pdev, plat_dat, &mac); |
296 | if (ret) { | 296 | if (ret) { |
297 | pr_err("%s: main dt probe failed", __func__); | 297 | pr_err("%s: main dt probe failed", __func__); |