diff mbox series

[2/2] platform/x86: dell-ddv: Prefer asynchronous probing

Message ID 20230205205456.2364-3-W_Armin@gmx.de (mailing list archive)
State Handled Elsewhere
Headers show
Series platform/x86: dell-ddv: Various driver updates | expand

Commit Message

Armin Wolf Feb. 5, 2023, 8:54 p.m. UTC
During probe, both sensor buffers need to be queried to
initialize the hwmon channels. This might be slow on some
machines, causing a unnecessary delay during boot.
Mark the driver with PROBE_PREFER_ASYNCHRONOUS so that it
can be probed asynchronously.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 drivers/platform/x86/dell/dell-wmi-ddv.c | 2 ++
 1 file changed, 2 insertions(+)

--
2.30.2

Comments

Hans de Goede Feb. 6, 2023, 2:13 p.m. UTC | #1
Hi,

On 2/5/23 21:54, Armin Wolf wrote:
> During probe, both sensor buffers need to be queried to
> initialize the hwmon channels. This might be slow on some
> machines, causing a unnecessary delay during boot.
> Mark the driver with PROBE_PREFER_ASYNCHRONOUS so that it
> can be probed asynchronously.
> 
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <hdegoede@redhat.com>

Regards,

Hans


> ---
>  drivers/platform/x86/dell/dell-wmi-ddv.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/platform/x86/dell/dell-wmi-ddv.c b/drivers/platform/x86/dell/dell-wmi-ddv.c
> index b7ac483eff12..cffbba5e2d9a 100644
> --- a/drivers/platform/x86/dell/dell-wmi-ddv.c
> +++ b/drivers/platform/x86/dell/dell-wmi-ddv.c
> @@ -10,6 +10,7 @@
>  #include <linux/acpi.h>
>  #include <linux/debugfs.h>
>  #include <linux/device.h>
> +#include <linux/device/driver.h>
>  #include <linux/dev_printk.h>
>  #include <linux/errno.h>
>  #include <linux/kconfig.h>
> @@ -872,6 +873,7 @@ MODULE_DEVICE_TABLE(wmi, dell_wmi_ddv_id_table);
>  static struct wmi_driver dell_wmi_ddv_driver = {
>  	.driver = {
>  		.name = DRIVER_NAME,
> +		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
>  	},
>  	.id_table = dell_wmi_ddv_id_table,
>  	.probe = dell_wmi_ddv_probe,
> --
> 2.30.2
>
diff mbox series

Patch

diff --git a/drivers/platform/x86/dell/dell-wmi-ddv.c b/drivers/platform/x86/dell/dell-wmi-ddv.c
index b7ac483eff12..cffbba5e2d9a 100644
--- a/drivers/platform/x86/dell/dell-wmi-ddv.c
+++ b/drivers/platform/x86/dell/dell-wmi-ddv.c
@@ -10,6 +10,7 @@ 
 #include <linux/acpi.h>
 #include <linux/debugfs.h>
 #include <linux/device.h>
+#include <linux/device/driver.h>
 #include <linux/dev_printk.h>
 #include <linux/errno.h>
 #include <linux/kconfig.h>
@@ -872,6 +873,7 @@  MODULE_DEVICE_TABLE(wmi, dell_wmi_ddv_id_table);
 static struct wmi_driver dell_wmi_ddv_driver = {
 	.driver = {
 		.name = DRIVER_NAME,
+		.probe_type = PROBE_PREFER_ASYNCHRONOUS,
 	},
 	.id_table = dell_wmi_ddv_id_table,
 	.probe = dell_wmi_ddv_probe,