Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 311621 - omnibook module does not compile after commit
Summary: omnibook module does not compile after commit
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Markos Chandras (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-27 13:27 UTC by Tiago Batista
Modified: 2010-03-29 16:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
This patch solves the build failure (backlight-2.6.34-omnibook-20090628.patch,2.18 KB, patch)
2010-03-27 13:33 UTC, Tiago Batista
Details | Diff
Patch that solves the problem (backlight-2.6.34-omnibook-20090628.patch,1.38 KB, patch)
2010-03-27 13:37 UTC, Tiago Batista
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tiago Batista 2010-03-27 13:27:45 UTC
Commit a19a6ee6cad2b20292a774c2f56ba8039b0fac9c modifies the backlight_device_register() arguments.

This modification breaks the build for the omnibook module 

Reproducible: Always

Steps to Reproduce:
1.Update your (non portage) kernel git tree
2.emerge omnibook


Actual Results:  
build fails when compiling lcd.c

Expected Results:  
Successfull build, and a functional omnibook module
Comment 1 Tiago Batista 2010-03-27 13:33:58 UTC
Created attachment 225447 [details, diff]
This patch solves the build failure

This patch solves the build problem described.
I introduced changes that are similar to those introduced on other drivers that call backlight_device_register()

This pach does add a compiler warning, but I believe the code is more readable like this. I am sure that the omnibook team will come up with a cleaner approach, but this is a working temporary solution.

Please review the patch, and if you feel comfortable with it, add to the omnibook ebuild
Comment 2 Tiago Batista 2010-03-27 13:37:17 UTC
Created attachment 225449 [details, diff]
Patch that solves the problem

Sorry, the previous patch included the diff for the other patch that the portage already applies...
Comment 3 Markos Chandras (RETIRED) gentoo-dev 2010-03-29 10:50:03 UTC
afaik this patch is only valid when kernel sources are > 2.6.33 right?
Comment 4 Tiago Batista 2010-03-29 13:08:21 UTC
(In reply to comment #3)
> afaik this patch is only valid when kernel sources are > 2.6.33 right?
> 

I tried to write a generic patch. I have not tested it with older kernels, but I hope I got the preprocessor statements right.

If so, this pacth can be applied regardless of the running kernel version, as the preprocessor will choose the right code blocks to compile for each kernel.

If I got it wrong, compiling against a non 2.6.34 kernel should error out when calling backlight_device_register() as the number of arguments vary with the version of the kernel.
Comment 5 Markos Chandras (RETIRED) gentoo-dev 2010-03-29 15:38:12 UTC
Ok thanks

I commit your patch.

Please try and send it to upstream as well

Many thanks

+*omnibook-20090628-r1 (29 Mar 2010)
+
+  29 Mar 2010; Markos Chandras <hwoarang@gentoo.org>
+  +files/backlight-2.6.34-omnibook-20090628.patch,
+  +omnibook-20090628-r1.ebuild:
+  Patch which fixes backlight compilation with kernels>=2.6.34. Thanks to
+  Tiago Batista <a19944@gmail.com> for the patch. Fixes bug #311621
+