[PATCH] Fix compile for 2.6.25 ( >= rc-3) kernels #2

View: New views
2 Messages — Rating Filter:   Alert me  

[PATCH] Fix compile for 2.6.25 ( >= rc-3) kernels #2

by Christian Gmeiner-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Okay.. here is my second try.. now as hg export.

greets,
Christian

PS: hg seems to be quite cool :)

[I2C_DRIVERID_EEPROM.patch]

# HG changeset patch
# User Christian Gmeiner <christian.gmeiner@...>
# Date 1206105062 -3600
# Node ID 81c8bc7a3d59e8fc4c4c65325a0a25976ec10ffb
# Parent  2a6b83ebab1c031b1e01f3aee40c90938023bb09
I2C_DRIVERID_EEPROM got removed from linux kernel, so define I2C_DRIVERID_EEPROM if it
is not defined by linux kernel (/include/linux/i2c-id.h).

diff -r 2a6b83ebab1c -r 81c8bc7a3d59 modules/em8300_i2c.c
--- a/modules/em8300_i2c.c Wed Mar 12 21:51:11 2008 +0200
+++ b/modules/em8300_i2c.c Fri Mar 21 14:11:02 2008 +0100
@@ -55,6 +55,11 @@
 #define sysfs_remove_link(kobj, name) do {} while (0)
 #else
 #include <linux/sysfs.h>
+#endif
+
+/* fix for 2.6.25 ( >= rc-3) kernels */
+#ifndef I2C_DRIVERID_EEPROM
+#define I2C_DRIVERID_EEPROM 1005
 #endif
 
 #define I2C_HW_B_EM8300 0xa


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel

Re: [PATCH] Fix compile for 2.6.25 ( >= rc-3) kernels #2

by Nicolas Boullis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Christian and others,

On Fri, Mar 21, 2008 at 02:34:50PM +0100, Christian Gmeiner wrote:
> Okay.. here is my second try.. now as hg export.

Alright, you perfectly adressed all my comments.

The bad news is I thought a little more about that new API change...
You set I2C_DRIVERID_EEPROM (to the old value) because it isn't defined
anymore. But then it means it probably isn't used anymore by the EEPROM
driver, which means it is now useless to test this value.

So I has a look at the corresponding git change:
  http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=7b501b1f53605bec17454dd8bbdbbf3f57a7cf32
and it confirmes what I thought, so I decided to talk to Jean Delvare
who made this change (sorry, this was in french).

Thanks to his suggestions and explanations, I think I've been able to
solve this problem in a different way. It was just committed to my
mercurial repository. All feedback is welcome.


> PS: hg seems to be quite cool :)

I'm glad you like it.
When I was introduced to hg, I almost immediately fell in love and
within a few days decided to switch the em8300 project to it.


Cheers,

Nicolas

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Dxr3-devel mailing list
Dxr3-devel@...
https://lists.sourceforge.net/lists/listinfo/dxr3-devel
LightInTheBox - Buy quality products at wholesale price