On 08/25/2016 07:50 PM, Luis R. Rodriguez wrote:
+#else /* CONFIG_FW_LOADER_USER_HELPER */
+
+static int loading_timeout = 60;
+#define firmware_loading_timeout() (loading_timeout * HZ)
+
+#define fw_status_wait_timeout(fw_st, long) 0
The timeout makes 0 sense for when !CONFIG_FW_LOADER_USER_HELPER so can
we do away with adding a silly 60 value to an int here and
the silly value of (loading_timeout * HZ) ? Its not used so its not
clear to me why this is here.
So the main reason that silly timeout is needed is the usage of
it in device_cache_fw_images(). I suggest we add a timeout
argument to _request_firmware() and use the right timeout value
at that level.
That allows to move the loading_timeout into the
CONFIG_FW_LOADER_USER_HELPER section.