From: Ionut Nicu Date: Fri, 7 Mar 2008 17:27:59 +0000 (+0200) Subject: [POWERPC] QE: Make qe_get_firmware_info reentrant X-Git-Tag: v2.6.25-rc6~30^2~12 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=86f4e5d4335556191b436b41b0ad2f719c4a98d4;p=linux-2.6-omap-h63xx.git [POWERPC] QE: Make qe_get_firmware_info reentrant The function was returning NULL the second time it was called if the firmware was uploaded from the boot loader or the first time it was called if the firmware was uploaded from the kernel. Signed-off-by: Ionut Nicu Acked-By: Timur Tabi Signed-off-by: Kumar Gala --- diff --git a/arch/powerpc/sysdev/qe_lib/qe.c b/arch/powerpc/sysdev/qe_lib/qe.c index f963fbf21ef..cc81fd1141b 100644 --- a/arch/powerpc/sysdev/qe_lib/qe.c +++ b/arch/powerpc/sysdev/qe_lib/qe.c @@ -609,7 +609,10 @@ struct qe_firmware_info *qe_get_firmware_info(void) * If we haven't checked yet, and a driver hasn't uploaded a firmware * yet, then check the device tree for information. */ - if (initialized || qe_firmware_uploaded) + if (qe_firmware_uploaded) + return &qe_firmware_info; + + if (initialized) return NULL; initialized = 1;