Re: [PATCH] misc,acpi,backlight: MSI S270 Laptop support

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

 



Hi Lennart,

On Monday 02 October 2006 21:10, Lennart Poettering wrote:
> +        
> +        msipf_device = platform_device_register_simple("msi-laptop-pf", -1, NULL, 0);
> +	if (IS_ERR(msipf_device)) {
> +		ret = PTR_ERR(msipf_device);
> +		goto fail_platform_driver;
> +	}
> +

Please do not use platform_device_register_simple, use platform_device_alloc
and platform_device_add instead (_simple will go away some day).

> +        ret = sysfs_create_group(&msipf_device->dev.kobj, &msipf_attribute_group);
> +        if (ret)
> +                goto fail_platform_device;
> +
> +
> +        /* Enable automatic brightness control again */
> +        if (auto_brightness != 2)
> +                set_auto_brightness(1);     
> +

What happens if auto_brightness is 2 but userspace messed up with it
through device's sysfs attribute? Overall brightness controll interface
(module vs. per-device) needs to be tightened up.

-- 
Dmitry
-
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