platform/x86: wmi-bmof: Make use of .bin_size() callback
authorArmin Wolf <W_Armin@gmx.de>
Fri, 6 Dec 2024 21:56:50 +0000 (22:56 +0100)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 17 Dec 2024 11:13:10 +0000 (13:13 +0200)
commit0c91d916af898e481444d17eed8ce8df6c50f70d
tree6be4a1e55c565e1393aa1a29650d55d3b22fac18
parent204d45fe680be98be356acb7c603622606356be7
platform/x86: wmi-bmof: Make use of .bin_size() callback

Until now the wmi-bmof driver had to allocate the binary sysfs
attribute dynamically since its size depends on the bmof buffer
returned by the firmware.

Use the new .bin_size() callback to avoid having to do this memory
allocation.

Tested on a Asus Prime B650-Plus.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20241206215650.2977-1-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/wmi-bmof.c