From b02488b033404ff438086a70078316b2c63e22d8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Mathieu=20B=C3=A9rard?= Date: Mon, 10 Dec 2007 22:17:39 +0000 Subject: [PATCH] * Fix all compile warning in 2.6.24 (-rc4 really) * Fix typo in acpi.c --- acpi.c | 2 +- init.c | 6 +++++- laptop.h | 4 ++++ omnibook.h | 9 ++++++++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/acpi.c b/acpi.c index 6278b3b..2aef0f3 100644 --- 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 13998bb..2dfdb7a 100644 --- 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) diff --git a/laptop.h b/laptop.h index 57706fe..8d77448 100644 --- a/laptop.h +++ b/laptop.h @@ -18,7 +18,11 @@ #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 = { { diff --git a/omnibook.h b/omnibook.h index 9f05275..2191982 100644 --- a/omnibook.h +++ b/omnibook.h @@ -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 -- 2.43.5