Hi Eric,

On Wed, 13 Feb 2008 01:22:52 -0800, Eric Miao wrote:
> Hi wolfram,
> 
> I can help test this of cuz, yet I have a few questions:
> 
> 1. what's the exact reason of moving the i2c->adap.nr assignment to the
> begining, it looks this is unnecessary since I didn't find any dependency
> of the following code on i2c->adap.nr ??

There is a dependency:

-       sprintf(i2c->adap.name, "pxa_i2c-i2c.%u", dev->id);

+       snprintf(i2c->adap.name, sizeof(i2c->adap.name), "pxa_i2c-i2c.%u",
+                i2c->adap.nr);

We are using i2c->adap.nr instead of dev->id to generate the adapter
name. This is to avoid a name of "pxa_i2c-i2c.-1" if there is a single
platform device, "pxa_i2c-i2c.0" looks better I think.

> 
> 2. the remaining changes looks good, so they are clean up right? instead
> of trying to fix something

Yes, these are essentially cleanups, I don't think that anything bad
was really happening in practice before this patch.

Thanks,
-- 
Jean Delvare

_______________________________________________
i2c mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/i2c

Reply via email to