Skip to contentSkip to conversation

struct i2c_adapter

DISCUSSION Ron Rindzunski 3 participants 4 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

Hi !
trying to port my own application using i2c 2.6.1 interface version to i2c 2.9.0 version i got two compile errors, both referring to changes been done in struct i2c_adapter in i2c.h file:
problem # 1:
struct i2c_adapter {
- struct semaphore lock;
was replaced by
+ struct semaphore bus;
+ struct semaphore list;
problem # 2:
- int client_count;
has been deleted completely
}

can you please explain to me what were those fields original intention, why did you apply the changes, and most important - what should i do in order to overcome the problems resulting from those changes.

thanks
Ron
[email protected]

---------------------------------
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050313/47501b6f/attachment.html

#1 lore raw

Hi folks,

Quoted 19 lines
Quoted 14 lines

trying to port my own application using i2c 2.6.1 interface version to i2c 2.9.0 version i got two compile errors, both referring to changes been done in struct i2c_adapter in i2c.h file:
problem # 1:
struct i2c_adapter {

(quoted diff) +2 -1
-    struct semaphore lock;
      was replaced by    
+   struct semaphore bus;
+   struct semaphore list;

problem # 2:
- int client_count;
has been deleted completely
}

Quoted 4 lines

can you please explain to me what were those fields original intention, why did you apply the changes, and most important - what should i do in order to overcome the problems resulting from those changes.

Quoted 5 lines

they have to do with locking.
the i2c and sensors CHANGES documents provide some background, you can see more information from the cvs logs.
The best way to fix it is to diff a similar driver from 2.6.1 to 2.9.0 and that will show you what changes you have to make.

This probably won't help. These members are used by i2c-core only, other drivers should NOT use them. If Ron's driver broke, I suspect it is using them, but really shouldn't.

Signature · 1 line
Jean Delvare
#2 lore raw
In reply to Ron Rindzunski
Quoted 15 lines · Ron Rindzunski

Hi !
trying to port my own application using i2c 2.6.1 interface version to i2c 2.9.0 version i got two compile errors, both referring to changes been done in struct i2c_adapter in i2c.h file:
problem # 1:
struct i2c_adapter {

(quoted diff) +2 -1
-    struct semaphore lock;
      was replaced by    
+   struct semaphore bus;
+   struct semaphore list;

problem # 2:
- int client_count;
has been deleted completely
}

Quoted 8 lines

can you please explain to me what were those fields original intention, why did you apply the changes, and most important - what should i do in order to overcome the problems resulting from those changes.

thanks
Ron
[email protected] <mailto:[email protected]>

they have to do with locking.
the i2c and sensors CHANGES documents provide some background, you can see more information from the cvs logs.
The best way to fix it is to diff a similar driver from 2.6.1 to 2.9.0 and that will show you what changes you have to make.
If you have specific questions let us know.

mds

#3 lore raw
In reply to Ron Rindzunski

Hi Jean and Mark

Thanks for the fast answer guys!
I did looked at the docs and although it took me a while to figure them out, my application is now working OK.

will be glad to write to you again,

Ron Rindjunsky

Jean Delvare <[email protected]> wrote:
Hi folks,

Quoted 19 lines
Quoted 14 lines

trying to port my own application using i2c 2.6.1 interface version to i2c 2.9.0 version i got two compile errors, both referring to changes been done in struct i2c_adapter in i2c.h file:
problem # 1:
struct i2c_adapter {
- struct semaphore lock;
was replaced by
+ struct semaphore bus;
+ struct semaphore list;
problem # 2:
- int client_count;
has been deleted completely
}

Quoted 4 lines

can you please explain to me what were those fields original intention, why did you apply the changes, and most important - what should i do in order to overcome the problems resulting from those changes.

Quoted 5 lines

they have to do with locking.
the i2c and sensors CHANGES documents provide some background, you can see more information from the cvs logs.
The best way to fix it is to diff a similar driver from 2.6.1 to 2.9.0 and that will show you what changes you have to make.

This probably won't help. These members are used by i2c-core only, other drivers should NOT use them. If Ron's driver broke, I suspect it is using them, but really shouldn't.

Signature · 9 lines
Jean Delvare

		
---------------------------------
Do you Yahoo!?
 Yahoo! Small Business - Try our new resources site! 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20050324/60cfdef7/attachment.html