* [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS
@ 2009-12-18 14:29 Thomas Renninger
2009-12-18 14:29 ` [PATCH 2/2] x86 platform drivers, hp-wmi: Fix two memleaks Thomas Renninger
` (3 more replies)
0 siblings, 4 replies; 8+ messages in thread
From: Thomas Renninger @ 2009-12-18 14:29 UTC (permalink / raw)
To: lenb; +Cc: Thomas Renninger, Carlos Corbacho, Matthew Garrett, linux-acpi
wmi autoloading came in, so the dmi matching for autoloading
is not needed anymore.
CC: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: Matthew Garrett <mjg59@srcf.ucam.org>
CC: linux-acpi@vger.kernel.org
CC: Len Brown <lenb@kernel.org>
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
drivers/platform/x86/acer-wmi.c | 3 ---
drivers/platform/x86/msi-wmi.c | 10 ----------
2 files changed, 0 insertions(+), 13 deletions(-)
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 454970d..07d14df 100644
--- a/drivers/platform/x86/acer-wmi.c
+++ b/drivers/platform/x86/acer-wmi.c
@@ -96,9 +96,6 @@ struct acer_quirks {
MODULE_ALIAS("wmi:67C3371D-95A3-4C37-BB61-DD47B491DAAB");
MODULE_ALIAS("wmi:6AF4F258-B401-42fd-BE91-3D4AC2D7C0D3");
-/* Temporary workaround until the WMI sysfs interface goes in */
-MODULE_ALIAS("dmi:*:*Acer*:*:");
-
/*
* Interface capability flags
*/
diff --git a/drivers/platform/x86/msi-wmi.c b/drivers/platform/x86/msi-wmi.c
index 0c8fe14..7f77f90 100644
--- a/drivers/platform/x86/msi-wmi.c
+++ b/drivers/platform/x86/msi-wmi.c
@@ -34,16 +34,6 @@ MODULE_LICENSE("GPL");
MODULE_ALIAS("wmi:551A1F84-FBDD-4125-91DB-3EA8F44F1D45");
MODULE_ALIAS("wmi:B6F3EEF2-3D2F-49DC-9DE3-85BCE18C62F2");
-/* Temporary workaround until the WMI sysfs interface goes in
- { "svn", DMI_SYS_VENDOR },
- { "pn", DMI_PRODUCT_NAME },
- { "pvr", DMI_PRODUCT_VERSION },
- { "rvn", DMI_BOARD_VENDOR },
- { "rn", DMI_BOARD_NAME },
-*/
-
-MODULE_ALIAS("dmi:*:svnMICRO-STARINTERNATIONAL*:pnMS-6638:*");
-
#define DRV_NAME "msi-wmi"
#define DRV_PFX DRV_NAME ": "
--
1.6.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] x86 platform drivers, hp-wmi: Fix two memleaks
2009-12-18 14:29 [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS Thomas Renninger
@ 2009-12-18 14:29 ` Thomas Renninger
2009-12-24 5:56 ` Len Brown
2009-12-18 16:43 ` [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS Carlos Corbacho
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Thomas Renninger @ 2009-12-18 14:29 UTC (permalink / raw)
To: lenb; +Cc: Thomas Renninger, Carlos Corbacho, Matthew Garrett, linux-acpi
CC: Carlos Corbacho <carlos@strangeworlds.co.uk>
CC: Matthew Garrett <mjg59@srcf.ucam.org>
CC: linux-acpi@vger.kernel.org
CC: Len Brown <lenb@kernel.org>
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
drivers/platform/x86/hp-wmi.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 63c3e65..01a0913 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -134,10 +134,15 @@ static int hp_wmi_perform_query(int query, int write, int value)
obj = output.pointer;
- if (!obj || obj->type != ACPI_TYPE_BUFFER)
+ if (!obj)
return -EINVAL;
+ else if (obj->type != ACPI_TYPE_BUFFER) {
+ kfree(obj);
+ return -EINVAL;
+ }
bios_return = *((struct bios_return *)obj->buffer.pointer);
+ kfree(obj);
if (bios_return.return_code > 0)
return bios_return.return_code * -1;
else
@@ -340,10 +345,13 @@ static void hp_wmi_notify(u32 value, void *context)
if (!obj || obj->type != ACPI_TYPE_BUFFER || obj->buffer.length != 8) {
printk(KERN_INFO "HP WMI: Unknown response received\n");
+ if (obj)
+ kfree(obj);
return;
}
eventcode = *((u8 *) obj->buffer.pointer);
+ kfree(obj);
if (eventcode == 0x4)
eventcode = hp_wmi_perform_query(HPWMI_HOTKEY_QUERY, 0,
0);
--
1.6.3
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS
2009-12-18 14:29 [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS Thomas Renninger
2009-12-18 14:29 ` [PATCH 2/2] x86 platform drivers, hp-wmi: Fix two memleaks Thomas Renninger
@ 2009-12-18 16:43 ` Carlos Corbacho
2009-12-18 17:44 ` Anisse Astier
2009-12-24 5:50 ` Len Brown
3 siblings, 0 replies; 8+ messages in thread
From: Carlos Corbacho @ 2009-12-18 16:43 UTC (permalink / raw)
To: Thomas Renninger; +Cc: lenb, Matthew Garrett, linux-acpi
On Friday 18 December 2009 14:29:22 Thomas Renninger wrote:
> wmi autoloading came in, so the dmi matching for autoloading
> is not needed anymore.
>
> CC: Carlos Corbacho <carlos@strangeworlds.co.uk>
> CC: Matthew Garrett <mjg59@srcf.ucam.org>
> CC: linux-acpi@vger.kernel.org
> CC: Len Brown <lenb@kernel.org>
>
> Signed-off-by: Thomas Renninger <trenn@suse.de>
For acer-wmi:
Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>
--
E-Mail: carlos@strangeworlds.co.uk
Web: strangeworlds.co.uk
GPG Key ID: 0x23EE722D
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS
2009-12-18 14:29 [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS Thomas Renninger
2009-12-18 14:29 ` [PATCH 2/2] x86 platform drivers, hp-wmi: Fix two memleaks Thomas Renninger
2009-12-18 16:43 ` [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS Carlos Corbacho
@ 2009-12-18 17:44 ` Anisse Astier
2009-12-18 17:54 ` Matthew Garrett
2009-12-24 5:50 ` Len Brown
3 siblings, 1 reply; 8+ messages in thread
From: Anisse Astier @ 2009-12-18 17:44 UTC (permalink / raw)
Cc: lenb, Thomas Renninger, Carlos Corbacho, Matthew Garrett,
linux-acpi
On Fri, 18 Dec 2009 15:29:22 +0100, Thomas Renninger <trenn@suse.de> wrote :
> wmi autoloading came in, so the dmi matching for autoloading
> is not needed anymore.
>
For this to work properly you need to have wmi built in your kernel, or have
your distribution load the wmi module. Maybe there should be some kind of
auto-loading for the wmi subsystem (acpi-based?).
Anyway, that's out of the scope of this patch, which was the plan all-along.
FWIW, and for msi-wmi :
Acked-by: Anisse Astier <anisse@astier.eu>
Regards,
Anisse
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS
2009-12-18 17:44 ` Anisse Astier
@ 2009-12-18 17:54 ` Matthew Garrett
2009-12-20 20:15 ` Anisse Astier
0 siblings, 1 reply; 8+ messages in thread
From: Matthew Garrett @ 2009-12-18 17:54 UTC (permalink / raw)
To: Anisse Astier; +Cc: Thomas Renninger, lenb, Carlos Corbacho, linux-acpi
On Fri, Dec 18, 2009 at 06:44:58PM +0100, Anisse Astier wrote:
> For this to work properly you need to have wmi built in your kernel, or have
> your distribution load the wmi module. Maybe there should be some kind of
> auto-loading for the wmi subsystem (acpi-based?).
[mjg59@2530p ~]$ modinfo wmi | grep alias
alias: acpi*:pnp0c14:*
alias: acpi*:PNP0C14:*
Should work already.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS
2009-12-18 17:54 ` Matthew Garrett
@ 2009-12-20 20:15 ` Anisse Astier
0 siblings, 0 replies; 8+ messages in thread
From: Anisse Astier @ 2009-12-20 20:15 UTC (permalink / raw)
To: Matthew Garrett; +Cc: Thomas Renninger, lenb, Carlos Corbacho, linux-acpi
On Fri, Dec 18, 2009 at 18:54, Matthew Garrett <mjg59@srcf.ucam.org> wrote:
> On Fri, Dec 18, 2009 at 06:44:58PM +0100, Anisse Astier wrote:
>
>> For this to work properly you need to have wmi built in your kernel, or have
>> your distribution load the wmi module. Maybe there should be some kind of
>> auto-loading for the wmi subsystem (acpi-based?).
>
> [mjg59@2530p ~]$ modinfo wmi | grep alias
> alias: acpi*:pnp0c14:*
> alias: acpi*:PNP0C14:*
>
> Should work already.
>
Indeed, it does, my mistake.
I completely forgot about those lines. In fact, the reason I started
hacking on msi-wmi (the previous driver), was because it didn't have a
proper auto-loading, and thus we packaged it out of kernel tree.
It was using dmi auto-loading with those standard wmi strings (pnp0c14).
Regards,
--
Anisse
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS
2009-12-18 14:29 [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS Thomas Renninger
` (2 preceding siblings ...)
2009-12-18 17:44 ` Anisse Astier
@ 2009-12-24 5:50 ` Len Brown
3 siblings, 0 replies; 8+ messages in thread
From: Len Brown @ 2009-12-24 5:50 UTC (permalink / raw)
To: Thomas Renninger; +Cc: Carlos Corbacho, Matthew Garrett, linux-acpi
applied
thanks,
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] x86 platform drivers, hp-wmi: Fix two memleaks
2009-12-18 14:29 ` [PATCH 2/2] x86 platform drivers, hp-wmi: Fix two memleaks Thomas Renninger
@ 2009-12-24 5:56 ` Len Brown
0 siblings, 0 replies; 8+ messages in thread
From: Len Brown @ 2009-12-24 5:56 UTC (permalink / raw)
To: Thomas Renninger; +Cc: Carlos Corbacho, Matthew Garrett, linux-acpi
thanks,
Len Brown, Intel Open Source Technology Center
On Fri, 18 Dec 2009, Thomas Renninger wrote:
> CC: Carlos Corbacho <carlos@strangeworlds.co.uk>
> CC: Matthew Garrett <mjg59@srcf.ucam.org>
> CC: linux-acpi@vger.kernel.org
> CC: Len Brown <lenb@kernel.org>
>
> Signed-off-by: Thomas Renninger <trenn@suse.de>
> ---
> drivers/platform/x86/hp-wmi.c | 10 +++++++++-
> 1 files changed, 9 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
> index 63c3e65..01a0913 100644
> --- a/drivers/platform/x86/hp-wmi.c
> +++ b/drivers/platform/x86/hp-wmi.c
> @@ -134,10 +134,15 @@ static int hp_wmi_perform_query(int query, int write, int value)
>
> obj = output.pointer;
>
> - if (!obj || obj->type != ACPI_TYPE_BUFFER)
> + if (!obj)
> return -EINVAL;
> + else if (obj->type != ACPI_TYPE_BUFFER) {
> + kfree(obj);
> + return -EINVAL;
> + }
>
> bios_return = *((struct bios_return *)obj->buffer.pointer);
> + kfree(obj);
> if (bios_return.return_code > 0)
> return bios_return.return_code * -1;
> else
> @@ -340,10 +345,13 @@ static void hp_wmi_notify(u32 value, void *context)
>
> if (!obj || obj->type != ACPI_TYPE_BUFFER || obj->buffer.length != 8) {
> printk(KERN_INFO "HP WMI: Unknown response received\n");
> + if (obj)
> + kfree(obj);
WARNING: kfree(NULL) is safe this check is probably not required
#44: FILE: drivers/platform/x86/hp-wmi.c:349:
+ if (obj)
+ kfree(obj);
so I deleted "if(obj)" above and applied the patch.
thanks,
Len Brown, Intel Open Source Technology Center
> return;
> }
>
> eventcode = *((u8 *) obj->buffer.pointer);
> + kfree(obj);
> if (eventcode == 0x4)
> eventcode = hp_wmi_perform_query(HPWMI_HOTKEY_QUERY, 0,
> 0);
> --
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2009-12-24 5:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-18 14:29 [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS Thomas Renninger
2009-12-18 14:29 ` [PATCH 2/2] x86 platform drivers, hp-wmi: Fix two memleaks Thomas Renninger
2009-12-24 5:56 ` Len Brown
2009-12-18 16:43 ` [PATCH 1/2] x86 platform drivers, wmi: Remove needless dmi MODULE_ALIAS Carlos Corbacho
2009-12-18 17:44 ` Anisse Astier
2009-12-18 17:54 ` Matthew Garrett
2009-12-20 20:15 ` Anisse Astier
2009-12-24 5:50 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox