complete_all(&buf->completion);
}
+#define is_fw_load_aborted(buf) \
+ test_bit(FW_STATUS_ABORT, &(buf)->status)
+
static ssize_t firmware_timeout_show(struct class *class,
struct class_attribute *attr,
char *buf)
{
return -ENOENT;
}
+
+/* No abort during direct loading */
+#define is_fw_load_aborted(buf) false
+
#endif /* CONFIG_FW_LOADER_USER_HELPER */
mutex_lock(&fw_lock);
while (!test_bit(FW_STATUS_DONE, &buf->status)) {
- if (test_bit(FW_STATUS_ABORT, &buf->status)) {
+ if (is_fw_load_aborted(buf)) {
ret = -ENOENT;
break;
}
struct firmware_buf *buf = fw->priv;
mutex_lock(&fw_lock);
- if (!buf->size || test_bit(FW_STATUS_ABORT, &buf->status)) {
+ if (!buf->size || is_fw_load_aborted(buf)) {
mutex_unlock(&fw_lock);
return -ENOENT;
}