From: greg@kroah.com (Greg KH)
To: lm-sensors@vger.kernel.org
Subject: Conversion guide for i2c chip drivers
Date: Thu, 19 May 2005 06:24:20 +0000 [thread overview]
Message-ID: <20030928165441.GA25879@kroah.com> (raw)
In-Reply-To: <20030927122451.191bb291.khali@linux-fr.org>
On Sun, Sep 28, 2003 at 03:15:07PM +0200, Jean Delvare wrote:
>
> > > In the detect function, why is memset called on client data before
> > > it is filled?
> >
> > Because the struct device burried in that structure needs to be set to
> > 0 before the register function is called.
>
> This doesn't answer my question. I know what memset does. What I don't
> know is why this is done, or, to make my question more precise, why it
> is done in 2.6 and wasn't in 2.4.
Again, we have to initialize a struct device to 0 before register is
called, otherwise we oops the kernel. 2.4 does not have a struct device
in the i2c code (or anywhere actually...)
But hey, don't trust me, try not doing it and see what happens :)
> Mmm, maybe I get it now. You plan to introduce an i2c_set_clientdata
> function in 2.4, which will access client->data instead of client->dev
> as it is the case in 2.6. Is that it?
Yes, that's it.
> OK, I've made the requested changes, plus some others. Document
> attached.
Looks good, thanks for doing this.
greg k-h
next prev parent reply other threads:[~2005-05-19 6:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 6:24 Conversion guide for i2c chip drivers Jean Delvare
2005-05-19 6:24 ` Greg KH
2005-05-19 6:24 ` Greg KH
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Mark Studebaker
2005-05-19 6:24 ` Greg KH
2005-05-19 6:24 ` Greg KH [this message]
2005-05-19 6:24 ` Greg KH
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20030928165441.GA25879@kroah.com \
--to=greg@kroah.com \
--cc=lm-sensors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.