]> git.ipfire.org Git - thirdparty/linux.git/commit
power: supply: mt6370: Simplify with devm_alloc_ordered_workqueue()
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Thu, 5 Mar 2026 21:45:44 +0000 (22:45 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 11 Mar 2026 05:58:00 +0000 (06:58 +0100)
commitf23afa01040a41882a048e4957a7acac1426da6f
tree88a9b96b4cd778680d9a27c5c3fee0324c452596
parent1e668baadefb16e81269dbfebf3ffc2672e3a3bb
power: supply: mt6370: Simplify with devm_alloc_ordered_workqueue()

Simplify the driver probe function by using
devm_alloc_ordered_workqueue() which handles the cleanup already.

Change is not equivalent in the workqueue itself: use non-legacy API
which does not set (__WQ_LEGACY | WQ_MEM_RECLAIM).  The workqueue is
used to update power supply data (power_supply_changed()) status, thus
there is no point to run it for memory reclaim.  Note that dev_name() is
not directly used in second argument to prevent possible unlikely
parsing any "%" character in device name as format.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20260305-workqueue-devm-v2-5-66a38741c652@oss.qualcomm.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/mt6370-charger.c