unsigned int panel_power_on_supported:1;
unsigned int usb_three_supported:1;
unsigned int sysfs_created:1;
+ unsigned int special_functions;
bool kbd_led_registered;
bool illumination_led_registered;
if (ACPI_FAILURE(status))
return -ENODEV;
- result = hci_write(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE);
+ /*
+ * Enable the "Special Functions" mode only if they are
+ * supported and if they are activated.
+ */
+ if (dev->kbd_function_keys_supported && dev->special_functions)
+ result = hci_write(dev, HCI_HOTKEY_EVENT,
+ HCI_HOTKEY_SPECIAL_FUNCTIONS);
+ else
+ result = hci_write(dev, HCI_HOTKEY_EVENT, HCI_HOTKEY_ENABLE);
+
if (result == TOS_FAILURE)
return -EIO;
else if (result == TOS_NOT_SUPPORTED)
return 0;
}
-static void toshiba_acpi_enable_special_functions(struct toshiba_acpi_dev *dev)
-{
- u32 result;
-
- /*
- * Re-activate the hotkeys, but this time, we are using the
- * "Special Functions" mode.
- */
- result = hci_write(dev, HCI_HOTKEY_EVENT,
- HCI_HOTKEY_SPECIAL_FUNCTIONS);
- if (result != TOS_SUCCESS)
- pr_err("Could not enable the Special Function mode\n");
-}
-
static bool toshiba_acpi_i8042_filter(unsigned char data, unsigned char str,
struct serio *port)
{
{
struct toshiba_acpi_dev *dev;
const char *hci_method;
- u32 special_functions;
u32 dummy;
int ret = 0;
* with the new keyboard layout, query for its presence to help
* determine the keymap layout to use.
*/
- ret = toshiba_function_keys_get(dev, &special_functions);
+ ret = toshiba_function_keys_get(dev, &dev->special_functions);
dev->kbd_function_keys_supported = !ret;
if (toshiba_acpi_setup_keyboard(dev))
print_supported_features(dev);
- /*
- * Enable the "Special Functions" mode only if they are
- * supported and if they are activated.
- */
- if (dev->kbd_function_keys_supported && special_functions)
- toshiba_acpi_enable_special_functions(dev);
-
ret = sysfs_create_group(&dev->acpi_dev->dev.kobj,
&toshiba_attr_group);
if (ret) {