From: Julien Valroff Date: Sat, 15 Jan 2011 09:13:28 +0000 (+0100) Subject: Patch from Ryan Martin X-Git-Url: https://gitweb.devoid-pointer.net/?a=commitdiff_plain;h=208d01c587017bd4318f68b91d1b82de1dbc9d77;p=omnibook.git Patch from Ryan Martin --- diff --git a/ac.c b/ac.c index 3787cdc..f03cefb 100644 --- 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, diff --git a/cooling.c b/cooling.c index a9a935e..3f507bd 100644 --- 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, diff --git a/debian/changelog b/debian/changelog index b550384..d66035f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 to fix + alignment issue with kernel >= 2.6.33 - -- Julien Valroff Sat, 15 Jan 2011 10:11:40 +0100 + -- Julien Valroff 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 c5278fe..70d5415 100644 --- 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; diff --git a/omnibook.h b/omnibook.h index db81114..762d936 100644 --- a/omnibook.h +++ b/omnibook.h @@ -66,6 +66,7 @@ struct omnibook_feature { struct omnibook_tbl *tbl; struct omnibook_operation *io_op; struct list_head list; + long pad[3]; }; /* diff --git a/throttling.c b/throttling.c index 31d7f6e..945eafa 100644 --- a/throttling.c +++ b/throttling.c @@ -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,