schedule_delayed_work(&bootrom->dwork, msecs_to_jiffies(timeout));
}
+static void gb_bootrom_cancel_timeout(struct gb_bootrom *bootrom)
+{
+ cancel_delayed_work_sync(&bootrom->dwork);
+}
+
/*
* The es2 chip doesn't have VID/PID programmed into the hardware and we need to
* hack that up to distinguish different modules and their firmware blobs.
int ret;
/* Disable timeouts */
- cancel_delayed_work_sync(&bootrom->dwork);
+ gb_bootrom_cancel_timeout(bootrom);
if (op->request->payload_size != sizeof(*size_request)) {
dev_err(dev, "%s: illegal size of firmware size request (%zu != %zu)\n",
int ret = 0;
/* Disable timeouts */
- cancel_delayed_work_sync(&bootrom->dwork);
+ gb_bootrom_cancel_timeout(bootrom);
if (op->request->payload_size != sizeof(*firmware_request)) {
dev_err(dev, "%s: Illegal size of get firmware request (%zu %zu)\n",
int ret = 0;
/* Disable timeouts */
- cancel_delayed_work_sync(&bootrom->dwork);
+ gb_bootrom_cancel_timeout(bootrom);
if (op->request->payload_size != sizeof(*rtb_request)) {
dev_err(dev, "%s: Illegal size of ready to boot request (%zu %zu)\n",
return 0;
err_cancel_timeout:
- cancel_delayed_work_sync(&bootrom->dwork);
+ gb_bootrom_cancel_timeout(bootrom);
err_connection_disable:
gb_connection_disable(connection);
err_connection_destroy:
gb_connection_disable(bootrom->connection);
/* Disable timeouts */
- cancel_delayed_work_sync(&bootrom->dwork);
+ gb_bootrom_cancel_timeout(bootrom);
/*
* Release firmware: