static int omnibook_acpi_bt_add(struct acpi_device *device);
static int omnibook_acpi_bt_remove(struct acpi_device *device, int type);
+
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,21)
+const struct acpi_device_id omnibook_bt_ids[] = {
+ {"TOS6205", 0},
+ {"", 0},
+};
+
+static struct acpi_driver omnibook_bt_driver = {
+ .name = OMNIBOOK_MODULE_NAME,
+ .class = TOSHIBA_ACPI_BT_CLASS,
+ .ids = omnibook_bt_ids,
+ .ops = {
+ .add = omnibook_acpi_bt_add,
+ .remove = omnibook_acpi_bt_remove,
+ },
+};
+#else /* 2.6.23 */
static struct acpi_driver omnibook_bt_driver = {
.name = OMNIBOOK_MODULE_NAME,
.class = TOSHIBA_ACPI_BT_CLASS,
.remove = omnibook_acpi_bt_remove,
},
};
+#endif /* 2.6.23 */
+
/*
* ACPI backend private data structure
struct omnibook_operation *io_op;
u8 brgt;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
+ io_op = bl_get_data(bd);
+#else /* 2.6.23 */
io_op = class_get_devdata(&bd->class_dev);
+#endif /* 2.6.23 */
retval = backend_byte_read(io_op, &brgt);
if (!retval)
retval = brgt;
#endif /* 2.6.21 */
struct omnibook_operation *io_op;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
+ io_op = bl_get_data(bd);
+#else /* 2.6.23 */
io_op = class_get_devdata(&bd->class_dev);
+#endif /* 2.6.23 */
return backend_byte_write(io_op, intensity);
}
#endif /* CONFIG_OMNIBOOK_BACKLIGHT */