[PATCH 4/4] powerpc: Call of_register_i2c_devices() for fsl-i2c.

Kumar Gala galak at kernel.crashing.org
Fri Dec 8 09:05:11 EST 2006


On Dec 7, 2006, at 11:35 AM, Scott Wood wrote:

> Call of_register_i2c_devices() to register I2C devices on
> the device tree under an fsl-i2c node.
>
> Signed-off-by: Scott Wood <scottwood at freescale.com>
> ---
> This patch depends on David Brownell's patchset at
> http://lists.lm-sensors.org/pipermail/i2c/2006-November/000516.html
>
>  arch/powerpc/sysdev/fsl_soc.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/powerpc/sysdev/fsl_soc.c b/arch/powerpc/sysdev/ 
> fsl_soc.c
> index ad31e56..a4d3c46 100644
> --- a/arch/powerpc/sysdev/fsl_soc.c
> +++ b/arch/powerpc/sysdev/fsl_soc.c
> @@ -345,6 +345,8 @@ static int __init fsl_i2c_of_init(void)
>  						    fsl_i2c_platform_data));
>  		if (ret)
>  			goto unreg;
> +
> +		of_register_i2c_devices(np, i);
>  	}

You are assuming the bus number is the same as our index. This may  
not be true.

>  	return 0;
> -- 
> 1.4.2.3
>
>
>
>
>
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev at ozlabs.org
> https://ozlabs.org/mailman/listinfo/linuxppc-dev




More information about the Linuxppc-dev mailing list