[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20241119-v6-10-topic-touchscreen-axiom-v1-2-6124925b9718@pengutronix.de>
Date: Tue, 19 Nov 2024 23:33:51 +0100
From: Marco Felsch <m.felsch@...gutronix.de>
To: Luis Chamberlain <mcgrof@...nel.org>,
Russ Weight <russ.weight@...ux.dev>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Kamel Bouhara <kamel.bouhara@...tlin.com>,
Marco Felsch <kernel@...gutronix.de>, Henrik Rydberg <rydberg@...math.org>,
Danilo Krummrich <dakr@...hat.com>
Cc: linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
linux-input@...r.kernel.org, kernel@...gutronix.de,
Marco Felsch <m.felsch@...gutronix.de>
Subject: [PATCH 2/5] firmware_loader: add support to handle
FW_UPLOAD_ERR_SKIP
It's no error if a driver indicates that the firmware is already
up-to-date and the update can be skipped.
Signed-off-by: Marco Felsch <m.felsch@...gutronix.de>
---
drivers/base/firmware_loader/sysfs_upload.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/base/firmware_loader/sysfs_upload.c b/drivers/base/firmware_loader/sysfs_upload.c
index b3cbe5b156e3..44f3d8fa5e64 100644
--- a/drivers/base/firmware_loader/sysfs_upload.c
+++ b/drivers/base/firmware_loader/sysfs_upload.c
@@ -174,6 +174,10 @@ static void fw_upload_main(struct work_struct *work)
fw_upload_update_progress(fwlp, FW_UPLOAD_PROG_PREPARING);
ret = fwlp->ops->prepare(fwl, fwlp->data, fwlp->remaining_size);
if (ret != FW_UPLOAD_ERR_NONE) {
+ if (ret == FW_UPLOAD_ERR_SKIP) {
+ dev_info(fw_dev, "firmware already up-to-date, skip update\n");
+ ret = FW_UPLOAD_ERR_NONE;
+ }
fw_upload_set_error(fwlp, ret);
goto putdev_exit;
}
--
2.39.5
Powered by blists - more mailing lists