linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Milton Miller <miltonm@bga.com>
To: Vitaly Bordug <vitb@kernel.crashing.org>
Cc: ppcdev <linuxppc-dev@ozlabs.org>
Subject: Re: [PATCH][RFC][POWERPC] i2c: adds support for i2c bus on 8xx
Date: Fri, 20 Apr 2007 10:15:32 -0500	[thread overview]
Message-ID: <85b6cd5d8e44d174bdcef9fbdd9e7947@bga.com> (raw)
In-Reply-To: <20070420082714.4f10f186@localhost.localdomain>

At Fri Apr 20 14:27:14 EST 2007, Vitaly Bordug wrote:
> +               i2c_dev = 
> platform_device_register_simple("fsl-i2c-cpm", i, &r[0], 3);
> +               if (IS_ERR(i2c_dev)) {
> +                       ret = PTR_ERR(i2c_dev);
> +                       goto err;
> +               }
> +
> +               ret =
> +                   platform_device_add_data(i2c_dev, &i2c_data,
> +                                            sizeof(struct
> +                                                   
> fsl_i2c_platform_data));
>

This exposes a period of time where the device is registerd, but
the platform data is not available.  It might work for the
everything-in-the kernel model where the device is added before
the driver is registered, but is inherently racy.

You need to do alloc / add_resources / add_data / add.

milton

  parent reply	other threads:[~2007-04-20 15:15 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-20  4:27 [PATCH][RFC][POWERPC] i2c: adds support for i2c bus on 8xx Vitaly Bordug
2007-04-20  8:57 ` Segher Boessenkool
2007-04-20 15:15 ` Milton Miller [this message]
2007-04-21  7:57 ` [PATCH][RFC] " Jean Delvare
2007-04-22 11:29   ` Vitaly Bordug
2007-04-23  9:19     ` Jean Delvare
2007-04-25 17:06       ` Vitaly Bordug
2007-04-26 15:54         ` Jean Delvare
2007-04-26 16:07           ` Vitaly Bordug
2007-04-23  2:57 ` [PATCH][RFC][POWERPC] " Olof Johansson
2007-04-25 17:01   ` Vitaly Bordug
2007-04-25 18:53     ` Scott Wood

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=85b6cd5d8e44d174bdcef9fbdd9e7947@bga.com \
    --to=miltonm@bga.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=vitb@kernel.crashing.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 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).