Re: [PATCH] fujitsu-laptop: kzalloc and autoload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> A couple of minor changes to the fujitsu laptop acpi driver.
> 1. use kzalloc.
> 2. add dmi aliases to get the driver to autoload.
>     note: use both spellings since different fujtisu laptop's seem to capitialize
>     differently.
> 
> Signed-off-by: Stephen Hemminger <shemminger@xxxxxxxxxxxxxxxxxxxx>

Looks sensible to me.

Ack.

Signed-off-by: Jonathan Woithe <jwoithe@xxxxxxxxxxxxxxxxxxxxxxx>

Regards
  jonathan


--- a/drivers/misc/fujitsu-laptop.c	2007-10-22 15:06:02.000000000 -0700
+++ b/drivers/misc/fujitsu-laptop.c	2007-10-22 15:07:15.000000000 -0700
@@ -61,6 +61,9 @@
 #define ACPI_FUJITSU_DRIVER_NAME        "Fujitsu laptop FUJ02B1 ACPI extras driver"
 #define ACPI_FUJITSU_DEVICE_NAME        "Fujitsu FUJ02B1"
 
+MODULE_ALIAS("dmi:*:svnFUJITSU:pnLifeBook*:pvr*:rvnFUJITSU:*");
+MODULE_ALIAS("dmi:*:svnFUJITSU:pnLifebook*:pvr*:rvnFUJITSU:*");
+
 struct fujitsu_t {
 	acpi_handle acpi_handle;
 	struct backlight_device *bl_device;
@@ -264,10 +267,9 @@ static int __init fujitsu_init(void)
 	if (acpi_disabled)
 		return -ENODEV;
 
-	fujitsu = kmalloc(sizeof(struct fujitsu_t), GFP_KERNEL);
+	fujitsu = kzalloc(sizeof(struct fujitsu_t), GFP_KERNEL);
 	if (!fujitsu)
 		return -ENOMEM;
-	memset(fujitsu, 0, sizeof(struct fujitsu_t));
 
 	result = acpi_bus_register_driver(&acpi_fujitsu_driver);
 	if (result < 0) {
-
-
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux