firmware_class: Fix firmware_loading_timeout usage of jiffies

* Prevent the firmware loading from exceeding the original
    theorical value of 60 seconds by using msecs_to_jiffies

Change-Id: I1e6dff9986bfa60fcf2ca22c04f847a750cac6d4
Signed-off-by: AdrianDC <radian.dc@gmail.com>
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
This commit is contained in:
AdrianDC 2016-05-08 11:07:56 +02:00 committed by Francescodario Cuzzocrea
parent ededc10ad7
commit e89f387f25

View file

@ -85,7 +85,8 @@ static int loading_timeout = 60; /* In seconds */
static inline long firmware_loading_timeout(void)
{
return loading_timeout > 0 ? loading_timeout * HZ : MAX_SCHEDULE_TIMEOUT;
return loading_timeout > 0 ? msecs_to_jiffies(loading_timeout * 1000) :
MAX_SCHEDULE_TIMEOUT;
}
/* fw_lock could be moved to 'struct firmware_priv' but since it is just