]> Devoid-pointer.net GitWeb - omnibook.git/commitdiff
Patch from Ryan Martin
authorJulien Valroff <julien@kirya.net>
Sat, 15 Jan 2011 09:13:28 +0000 (10:13 +0100)
committerJulien Valroff <julien@kirya.net>
Sat, 15 Jan 2011 09:13:28 +0000 (10:13 +0100)
ac.c
cooling.c
debian/changelog
init.c
omnibook.h
throttling.c

diff --git a/ac.c b/ac.c
index 3787cdc0ffe2f5dd9a9a6e74727c3ec328183882..f03cefb1e1a33ba6e6026b85b5b70e5dd6d92220 100644 (file)
--- a/ac.c
+++ b/ac.c
@@ -42,7 +42,7 @@ static struct omnibook_tbl ac_table[] __initdata = {
        {0,}
 };
 
-struct omnibook_feature __declared_feature ac_driver = {
+static struct omnibook_feature __declared_feature ac_driver = {
        .name = "ac",
 #ifdef CONFIG_OMNIBOOK_LEGACY
        .enabled = 1,
index a9a935e7e6f3edded7602cb0e6ef5c6e6399ab11..3f507bd9255d0790ae531a5811d7e3262885e8f4 100644 (file)
--- a/cooling.c
+++ b/cooling.c
@@ -80,7 +80,7 @@ static struct omnibook_tbl cooling_table[] __initdata = {
        {0,}
 };
 
-struct omnibook_feature __declared_feature cooling_driver = {
+static struct omnibook_feature __declared_feature cooling_driver = {
        .name = "cooling",
        .enabled = 1,
        .read = omnibook_cooling_read,
index b55038419d791f726e771f9c5696de6e2c39d8a4..d66035f4b561a4b6d9e7e8dd273246a964e32f63 100644 (file)
@@ -2,8 +2,10 @@ omnibook (2:2.20070211+svn20100520-2) unstable; urgency=low
 
   * Update my email address
   * Bump Debian policy to 3.9.1 
+  * Apply patch from Ryan Martin <kynalvarus@gmail.com> to fix
+    alignment issue with kernel >= 2.6.33
 
- -- Julien Valroff <julien@debian.org>  Sat, 15 Jan 2011 10:11:40 +0100
+ -- Julien Valroff <julien@debian.org>  Sat, 15 Jan 2011 10:12:15 +0100
 
 omnibook (2:2.20070211+svn20100520-1) unstable; urgency=low
 
diff --git a/init.c b/init.c
index c5278fea963fa35a5fe338fc4be630ba3d93d0b4..70d5415ab8628f003d112f2fa765d21a5a8cee7e 100644 (file)
--- a/init.c
+++ b/init.c
@@ -216,6 +216,8 @@ static struct omnibook_operation *omnibook_backend_match(struct omnibook_tbl *tb
 
        for (i = 0; tbl[i].ectypes; i++) {
                if (omnibook_ectype & tbl[i].ectypes) {
+                    dprintk("Attempting backend %s init.\n",
+                            tbl[i].io_op.backend->name);
                        if (tbl[i].io_op.backend->init && tbl[i].io_op.backend->init(&tbl[i].io_op)) {
                                dprintk("Backend %s init failed, skipping entry.\n",
                                        tbl[i].io_op.backend->name);
@@ -253,6 +255,7 @@ static int __init omnibook_init(struct omnibook_feature *feature)
                        dprintk("Match failed: disabling %s.\n", feature->name);
                        return -ENODEV;
                }
+                dprintk("Match succeeded: continuing with %s.\n", feature->name);
                feature->io_op = kmalloc(sizeof(struct omnibook_operation), GFP_KERNEL);
                if (!feature->io_op)
                        return -ENOMEM;
@@ -323,10 +326,14 @@ static int __init omnibook_probe(struct platform_device *dev)
                return -ENOMEM;
        INIT_LIST_HEAD(&omnibook_available_feature->list);
 
+        dprintk("Feature range %p - %p\n", _start_features_driver, _end_features_driver);
+
        for (i = 0; i < _end_features_driver - _start_features_driver; i++) {
 
                feature = &_start_features_driver[i];
-
+                dprintk("Testing feature %s at address %p\n", feature->name, feature);
+               if (!feature->name)
+                       continue;
                if (!feature->enabled)
                        continue;
 
index db811144d519f4536b802b310e44dc86de5ee76c..762d936cc142c7480a3d1b2b6c6346eb2e4d856f 100644 (file)
@@ -66,6 +66,7 @@ struct omnibook_feature {
        struct omnibook_tbl *tbl;
        struct omnibook_operation *io_op;
        struct list_head list;
+        long pad[3];
 };
 
 /*
index 31d7f6ed5d1be13907b8f3a99c2f8e5f77906ffe..945eafaa11ef84ca4a4213525386d0d75ba6e906 100644 (file)
@@ -68,7 +68,7 @@ static struct omnibook_tbl throttle_table[] __initdata = {
        {0,}
 };
 
-struct omnibook_feature __declared_feature throttle_driver = {
+static struct omnibook_feature __declared_feature throttle_driver = {
        .name = "throttling",
        .enabled = 1,
        .read = omnibook_throttle_read,