ARM: at91: fix ramc standby function registration
authorAlexandre Belloni <alexandre.belloni@free-electrons.com>
Wed, 27 Aug 2014 16:06:51 +0000 (18:06 +0200)
committerNicolas Ferre <nicolas.ferre@atmel.com>
Mon, 1 Sep 2014 16:37:51 +0000 (18:37 +0200)
commitc8260db557389c1fb46eeafb54414b03d9f19e49
tree7fa322efeb42840e096350b8aafc233109ff8de2
parentf55df0d654e10ad49e0e7edaeef02fa00e084d94
ARM: at91: fix ramc standby function registration

After the for_each_matching_node loop, we end up with a null value for np. Then,
of_match_node() is not matching anything and we can't register the standby
function and "ramc no standby function available" is printed.

Fix that by selecting the first available standby function. For now,
at91_pm_set_standby doesn't support multiple different standby functions and no
existing SoCs have different RAM controllers.

Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
arch/arm/mach-at91/setup.c