diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-25 10:51:53 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-25 10:51:53 +0100 |
commit | ff85f707ac49ad77b7cf8dcef38e7fcd468ca3d6 (patch) | |
tree | 886db57888058d507c6a14000cf4dd2b581311e1 /arch/arm/mach-at91/pm.c | |
parent | e9533ae539d5cc3d5fc501529d2df7b77e20449c (diff) | |
parent | bc465aa9d045feb0e13b4a8f32cc33c1943f62d6 (diff) | |
download | op-kernel-dev-ff85f707ac49ad77b7cf8dcef38e7fcd468ca3d6.zip op-kernel-dev-ff85f707ac49ad77b7cf8dcef38e7fcd468ca3d6.tar.gz |
Merge 4.0-rc5 into char-misc-next
We want those fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/arm/mach-at91/pm.c')
-rw-r--r-- | arch/arm/mach-at91/pm.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c index 5e34fb1..aa4116e 100644 --- a/arch/arm/mach-at91/pm.c +++ b/arch/arm/mach-at91/pm.c @@ -270,37 +270,35 @@ static void __init at91_pm_sram_init(void) phys_addr_t sram_pbase; unsigned long sram_base; struct device_node *node; - struct platform_device *pdev; + struct platform_device *pdev = NULL; - node = of_find_compatible_node(NULL, NULL, "mmio-sram"); - if (!node) { - pr_warn("%s: failed to find sram node!\n", __func__); - return; + for_each_compatible_node(node, NULL, "mmio-sram") { + pdev = of_find_device_by_node(node); + if (pdev) { + of_node_put(node); + break; + } } - pdev = of_find_device_by_node(node); if (!pdev) { pr_warn("%s: failed to find sram device!\n", __func__); - goto put_node; + return; } sram_pool = dev_get_gen_pool(&pdev->dev); if (!sram_pool) { pr_warn("%s: sram pool unavailable!\n", __func__); - goto put_node; + return; } sram_base = gen_pool_alloc(sram_pool, at91_slow_clock_sz); if (!sram_base) { pr_warn("%s: unable to alloc ocram!\n", __func__); - goto put_node; + return; } sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base); slow_clock = __arm_ioremap_exec(sram_pbase, at91_slow_clock_sz, false); - -put_node: - of_node_put(node); } #endif |