From: Scott Wood <scottwood@freescale.com>
To: David Brownell <david-b@pacbell.net>
Cc: rtc-linux@googlegroups.com, linuxppc-dev@ozlabs.org,
i2c@lm-sensors.org, Jean Delvare <khali@linux-fr.org>
Subject: Re: [i2c] [PATCH] Make i2c-mpc driver use i2c_add_numbered_adapter
Date: Wed, 16 May 2007 14:15:39 -0500 [thread overview]
Message-ID: <464B585B.10301@freescale.com> (raw)
In-Reply-To: <200705150828.37529.david-b@pacbell.net>
David Brownell wrote:
> On Tuesday 15 May 2007, Jean Delvare wrote:
>
>>On Mon, 14 May 2007 13:11:23 -0600, Grant Likely wrote:
>
>
>>>--- a/drivers/i2c/busses/i2c-mpc.c
>>>+++ b/drivers/i2c/busses/i2c-mpc.c
>>>@@ -327,9 +327,10 @@ static int fsl_i2c_probe(struct platform_device *pdev)
>>> platform_set_drvdata(pdev, i2c);
>>>
>>> i2c->adap = mpc_ops;
>>>+ i2c->adap.nr = pdev->id;
>
>
> By the way: mpc_ops is a static i2c_adapter, so given that
> the reason for using pdev->id that way was that there might
> be more than one such platform device ... shouldn't allocation
> of the adapter be moved into allocation of the "i2c->" object?
>
> Or at least, add a check to ensure that the static mpc_ops
> structure isn't in use before progressing this probe().
The mpc_ops struct is only used as a template; it gets copied into
i2c->adap for each adapter instance.
-Scott
prev parent reply other threads:[~2007-05-16 19:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-14 19:11 [PATCH] Make i2c-mpc driver use i2c_add_numbered_adapter Grant Likely
2007-05-14 19:32 ` Grant Likely
2007-05-15 13:26 ` [i2c] " Jean Delvare
2007-05-15 15:28 ` David Brownell
2007-05-15 15:51 ` Grant Likely
2007-05-15 16:05 ` David Brownell
2007-05-16 18:25 ` Jean Delvare
2007-05-16 18:38 ` Grant Likely
2007-05-16 19:15 ` Scott Wood [this message]
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=464B585B.10301@freescale.com \
--to=scottwood@freescale.com \
--cc=david-b@pacbell.net \
--cc=i2c@lm-sensors.org \
--cc=khali@linux-fr.org \
--cc=linuxppc-dev@ozlabs.org \
--cc=rtc-linux@googlegroups.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).