{ 0,0},
};
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19))
+static void omnibook_handle_fnkey(struct work_struct *work);
+#else
static void omnibook_handle_fnkey(void* data);
+#endif
/*
* Register the input handler and the input device in the input subsystem
priv_data->nbsmi_input_dev = nbsmi_input_dev;
- INIT_WORK(&priv_data->fnkey_work, *omnibook_handle_fnkey, priv_data);
-
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19))
+ INIT_WORK(&priv_data->fnkey_work, *omnibook_handle_fnkey);
+#else
+ INIT_WORK(&priv_data->fnkey_work, *omnibook_handle_fnkey, NULL);
+#endif
+
+
hook_handler.private = priv_data;
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,18))
/*
* Workqueue handler for Fn hotkeys
*/
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19))
+static void omnibook_handle_fnkey(struct work_struct *work)
+#else
static void omnibook_handle_fnkey(void* data)
+#endif
{
int i;
u8 gen_scan;
for(i = 0 ; i < ARRAY_SIZE(nbsmi_scan_table); i++) {
if( gen_scan == nbsmi_scan_table[i].scancode) {
dprintk("generating keycode %i.\n", nbsmi_scan_table[i].keycode);
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19))
+ input_dev = container_of(work, struct nbsmi_backend_data, fnkey_work)->nbsmi_input_dev;
+#else
input_dev = ((struct nbsmi_backend_data *) data)->nbsmi_input_dev;
+#endif
omnibook_report_key(input_dev, nbsmi_scan_table[i].keycode);
break;
}
static int key_polling_enabled;
static DEFINE_MUTEX(poll_mutex);
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19))
+static void omnibook_key_poller(struct work_struct *work);
+DECLARE_DELAYED_WORK(omnibook_poll_work, *omnibook_key_poller);
+#else
static void omnibook_key_poller(void *data);
-static struct omnibook_feature key_polling_driver;
-static DECLARE_WORK(omnibook_poll_work, *omnibook_key_poller, &key_polling_driver.io_op);
+DECLARE_WORK(omnibook_poll_work, *omnibook_key_poller, NULL);
+#endif
+static struct omnibook_feature key_polling_driver;
static struct input_dev *poll_input_dev;
-static void omnibook_key_poller(void *data)
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,19))
+ static void omnibook_key_poller(struct work_struct *work)
+#else
+ static void omnibook_key_poller(void *data)
+#endif
{
u8 q0a;
int retval;
- struct omnibook_operation *io_op;
-
- io_op = *( (struct omnibook_operation **) data);
- mutex_lock(&io_op->backend->mutex);
- __backend_byte_read(io_op, &q0a);
- __backend_byte_write(io_op, 0);
- mutex_unlock(&io_op->backend->mutex);
+ mutex_lock(&key_polling_driver.io_op->backend->mutex);
+ __backend_byte_read(key_polling_driver.io_op, &q0a);
+ __backend_byte_write(key_polling_driver.io_op, 0);
+ mutex_unlock(&key_polling_driver.io_op->backend->mutex);
#ifdef OMNIBOOK_DEBUG
if (unlikely(q0a & XE3GC_SLPB_MASK))