]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
* Fix all compile warning in 2.6.24 (-rc4 really)
authorMathieu Bérard <mathieu.berard@crans.org>
Mon, 10 Dec 2007 22:17:39 +0000 (22:17 +0000)
committerMathieu Bérard <mathieu.berard@crans.org>
Mon, 10 Dec 2007 22:17:39 +0000 (22:17 +0000)
* Fix typo in acpi.c

acpi.c
init.c
laptop.h
omnibook.h

diff --git a/acpi.c b/acpi.c
index 6278b3bc5ae8b294192d6d7c84e0851b3af0b906..2aef0f3365866bb3d180e5774f0102a8e45f2de6 100644 (file)
--- a/acpi.c
+++ b/acpi.c
@@ -71,7 +71,7 @@ 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)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
 const struct acpi_device_id omnibook_bt_ids[] = {
        {"TOS6205", 0},
        {"", 0},
diff --git a/init.c b/init.c
index 13998bbaddafc966a3a6a05c73506c2b3cfbacc4..2dfdb7a6b39233cf1d79f22b6b07461c4f8c72b5 100644 (file)
--- a/init.c
+++ b/init.c
@@ -82,7 +82,7 @@ static struct proc_dir_entry *omnibook_proc_root = NULL;
 
 enum omnibook_ectype_t omnibook_ectype = NONE;
 
-static char *laptop_model __initdata;
+static const char *laptop_model __initdata;
 
 static int omnibook_userset = 0;
 
@@ -132,7 +132,11 @@ static struct omnibook_feature *omnibook_available_feature;
 extern struct omnibook_feature _start_features_driver[];
 extern struct omnibook_feature _end_features_driver[];
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
 static int __init dmi_matched(struct dmi_system_id *dmi)
+#else
+static int __init dmi_matched(const struct dmi_system_id *dmi)
+#endif
 {
        omnibook_ectype = (int)dmi->driver_data;
        if (dmi->ident)
index 57706fe87acf693d30513a802c6505fef4284609..8d77448b00740c0e756c8060e5b1fd374fdcf7c2 100644 (file)
--- a/laptop.h
+++ b/laptop.h
 
 #define HP_SIGNATURE   "Hewlett-Packard"
 
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24))
 static int __init dmi_matched(struct dmi_system_id *dmi);
+#else
+static int __init dmi_matched(const struct dmi_system_id *dmi);
+#endif
 
 static struct  dmi_system_id omnibook_ids[] __initdata = {
        {
index 9f052756af3e4ec55c3ef0b2279bec0b7ceb5f39..219198276e9be56ab3fa89baf8d3132a9b8f84f1 100644 (file)
@@ -116,8 +116,15 @@ int omnibook_lcd_blank(int blank);
 struct omnibook_feature *omnibook_find_feature(char *name);
 void omnibook_report_key(struct input_dev *dev, unsigned int keycode);
 
+/* 
+ * __attribute_used__ is not defined anymore in 2.6.24
+ * but __used appeared only in 2.6.22
+ */
+#ifndef __used
+#define __used __attribute_used__
+#endif
 
-#define __declared_feature __attribute__ (( __section__(".features"),  __aligned__(__alignof__ (struct omnibook_feature)))) __attribute_used__
+#define __declared_feature __attribute__ (( __section__(".features"),  __aligned__(__alignof__ (struct omnibook_feature)))) __used
 
 /*
  * yet another printk wrapper