[PATCH v6 2/9] hid-asus: Add MODULE_IMPORT_NS(ASUS_WMI)

Luke D. Jones posted 9 patches 1 month, 4 weeks ago
[PATCH v6 2/9] hid-asus: Add MODULE_IMPORT_NS(ASUS_WMI)
Posted by Luke D. Jones 1 month, 4 weeks ago
A small change to asus_wmi_evaluate_method() was introduced during
asus-armoury driver development to put the exports behind a namespace.

Import that namespace here.

Signed-off-by: Luke D. Jones <luke@ljones.dev>
Acked-by: Jiri Kosina <jkosina@suse.com>
---
 drivers/hid/hid-asus.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
index a4b47319ad8e..9540e3e19cce 100644
--- a/drivers/hid/hid-asus.c
+++ b/drivers/hid/hid-asus.c
@@ -1301,4 +1301,5 @@ static struct hid_driver asus_driver = {
 };
 module_hid_driver(asus_driver);
 
+MODULE_IMPORT_NS(ASUS_WMI);
 MODULE_LICENSE("GPL");
-- 
2.46.1
Re: [PATCH v6 2/9] hid-asus: Add MODULE_IMPORT_NS(ASUS_WMI)
Posted by Ilpo Järvinen 1 month, 1 week ago
On Mon, 30 Sep 2024, Luke D. Jones wrote:

> A small change to asus_wmi_evaluate_method() was introduced during
> asus-armoury driver development to put the exports behind a namespace.
> 
> Import that namespace here.
> 
> Signed-off-by: Luke D. Jones <luke@ljones.dev>
> Acked-by: Jiri Kosina <jkosina@suse.com>
> ---
>  drivers/hid/hid-asus.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c
> index a4b47319ad8e..9540e3e19cce 100644
> --- a/drivers/hid/hid-asus.c
> +++ b/drivers/hid/hid-asus.c
> @@ -1301,4 +1301,5 @@ static struct hid_driver asus_driver = {
>  };
>  module_hid_driver(asus_driver);
>  
> +MODULE_IMPORT_NS(ASUS_WMI);
>  MODULE_LICENSE("GPL");

This order of patches will break the build since 1/9 put 
asus_wmi_evaluate_method() into that namespace so this module will fail 
build until this patch 2/9.

IMO, this change should just be part of 1/9 or perhaps better approach 
would be to make a new first patch into the series that does this and 
moves the export of asus_wmi_evaluate_method() into the namespace. The 
rest of the patch 1/9 would then become 2/9.

-- 
 i.