]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/platform/x86/classmate-laptop.c
backlight: Allow properties to be passed at registration
[net-next-2.6.git] / drivers / platform / x86 / classmate-laptop.c
index 035a7dd65a3fdf87d08305b9f0d663446240d4cd..6670ed8f9e5b4c849f4f8b853b4fda41069d2a05 100644 (file)
@@ -462,11 +462,13 @@ static struct backlight_ops cmpc_bl_ops = {
 
 static int cmpc_bl_add(struct acpi_device *acpi)
 {
+       struct backlight_properties props;
        struct backlight_device *bd;
 
-       bd = backlight_device_register("cmpc_bl", &acpi->dev,
-                                      acpi->handle, &cmpc_bl_ops);
-       bd->props.max_brightness = 7;
+       memset(&props, 0, sizeof(struct backlight_properties));
+       props.max_brightness = 7;
+       bd = backlight_device_register("cmpc_bl", &acpi->dev, acpi->handle,
+                                      &cmpc_bl_ops, &props);
        dev_set_drvdata(&acpi->dev, bd);
        return 0;
 }