Thread (9 messages) flat view 9 messages, 4 authors, 2007-05-16

Re: [i2c] [PATCH] Make i2c-mpc driver use i2c_add_numbered_adapter

From: Jean Delvare <hidden>
Date: 2007-05-16 18:25:17

On Tue, 15 May 2007 09:05:20 -0700, David Brownell wrote:
On Tuesday 15 May 2007, Grant Likely wrote:
quoted
Take another look; this is a funny quirk of the driver.  The
assignment is 'i2c->adap = mpc_ops'; not 'i2c->adap = &mpc_ops'.  And
in struct mpc_i2c, the field is declared as 'struct i2c_adapter adap',
not 'struct i2c_adapter *adap'.  The driver instance gets a copy of
the mpc_ops structure to initialize it, not a pointer to the staticly
defined structure.  I got bitten by the same thing when I was looking
at the code.
I see -- you're right.  That "template" idiom is a good one to get
rid of, FWIW ... not only is it confusing, but it also wastes space.
Well, maybe you can submit a patch fixing this one?

-- 
Jean Delvare
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help