]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/acpi/toshiba_acpi.c
memory hotplug: rearrange memory hotplug notifier
[linux-2.6-omap-h63xx.git] / drivers / acpi / toshiba_acpi.c
index 0208d3a3f5987e9ef4c6b8c0a2f06fa71eb4450c..a736ef7bdee4726e3ef03c50b8fd1100c4b7b6ad 100644 (file)
@@ -315,7 +315,7 @@ static int set_lcd(int value)
 
 static int set_lcd_status(struct backlight_device *bd)
 {
-       return set_lcd(bd->props->brightness);
+       return set_lcd(bd->props.brightness);
 }
 
 static unsigned long write_lcd(const char *buffer, unsigned long count)
@@ -362,7 +362,7 @@ static unsigned long write_video(const char *buffer, unsigned long count)
        int crt_out = -1;
        int tv_out = -1;
        u32 hci_result;
-       int video_out;
+       u32 video_out;
 
        /* scan expression.  Multiple expressions may be delimited with ;
         *
@@ -524,7 +524,7 @@ static acpi_status __init add_device(void)
        return AE_OK;
 }
 
-static acpi_status __exit remove_device(void)
+static acpi_status remove_device(void)
 {
        ProcItem *item;
 
@@ -533,14 +533,12 @@ static acpi_status __exit remove_device(void)
        return AE_OK;
 }
 
-static struct backlight_properties toshiba_backlight_data = {
-        .owner          = THIS_MODULE,
+static struct backlight_ops toshiba_backlight_data = {
         .get_brightness = get_lcd,
         .update_status  = set_lcd_status,
-        .max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1,
 };
 
-static void __exit toshiba_acpi_exit(void)
+static void toshiba_acpi_exit(void)
 {
        if (toshiba_backlight_device)
                backlight_device_unregister(toshiba_backlight_device);
@@ -561,10 +559,6 @@ static int __init toshiba_acpi_init(void)
        if (acpi_disabled)
                return -ENODEV;
 
-       if (!acpi_specific_hotkey_enabled) {
-               printk(MY_INFO "Using generic hotkey driver\n");
-               return -ENODEV;
-       }
        /* simple device detection: look for HCI method */
        if (is_valid_acpi_path(METHOD_HCI_1))
                method_hci = METHOD_HCI_1;
@@ -601,6 +595,7 @@ static int __init toshiba_acpi_init(void)
                toshiba_backlight_device = NULL;
                toshiba_acpi_exit();
        }
+        toshiba_backlight_device->props.max_brightness = HCI_LCD_BRIGHTNESS_LEVELS - 1;
 
        return (ACPI_SUCCESS(status)) ? 0 : -ENODEV;
 }