[PATCH 4/7] i2c: device id default to -1 for auto assignment

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sun Jul 29 05:59:03 EDT 2012


On 17:41 Sun 29 Jul     , Marc Reilly wrote:
> Signed-off-by: Marc Reilly <marc at cpdesign.com.au>
> ---
>  drivers/i2c/i2c.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/i2c/i2c.c b/drivers/i2c/i2c.c
> index 15f5507..c0d8fa2 100644
> --- a/drivers/i2c/i2c.c
> +++ b/drivers/i2c/i2c.c
> @@ -251,6 +251,7 @@ struct i2c_client *i2c_new_device(struct i2c_adapter *adapter,
>  	strcpy(client->dev.name, chip->type);
>  	client->dev.type_data = client;
>  	client->dev.platform_data = chip->platform_data;
> +	client->dev.id = -1;
use the macro DEVICE_ID_DYNAMIC

Best Regards,
J.



More information about the barebox mailing list