Re: [PATCH 1/2] of/i2c: Generalize OF support

From: Grant Likely
Date: Thu Jun 10 2010 - 12:58:41 EST


On Thu, Jun 10, 2010 at 3:52 AM, Wolfram Sang <w.sang@xxxxxxxxxxxxxx> wrote:
> Hi Grant,
>
> looks good to me in general. A few questions:
>
> On Wed, Jun 09, 2010 at 11:22:32PM -0600, Grant Likely wrote:
>> This patch cleans up the i2c OF support code to make it selectable by
>> all architectures and allow for automatic registration of i2c devices.
>>
>> Signed-off-by: Grant Likely <grant.likely@xxxxxxxxxxxx>
>> ---
>>  drivers/i2c/busses/i2c-cpm.c     |    3 ++-
>>  drivers/i2c/busses/i2c-ibm_iic.c |    3 ++-
>>  drivers/i2c/busses/i2c-mpc.c     |    3 ++-
>>  drivers/of/Kconfig               |    2 +-
>>  drivers/of/of_i2c.c              |   44 ++++++++++++++++++++++++--------------
>>  include/linux/of_i2c.h           |   13 +++++++++--
>>  6 files changed, 45 insertions(+), 23 deletions(-)
>>

Hi Wolfram, thanks for the review. Replies below.

>> @@ -49,10 +64,8 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
>>
>>               result = i2c_new_device(adap, &info);
>>               if (result == NULL) {
>> -                     printk(KERN_ERR
>> -                            "of-i2c: Failed to load driver for %s\n",
>> -                            info.type);
>> -                     irq_dispose_mapping(info.irq);
>
> Why is the dispose removed?

Hmmm... That looks like a mistake. I'll add it back.

>
>> +                     dev_err(&adap->dev, "of_i2c: Failure registering %s\n",
>> +                             node->full_name);
>>                       continue;
>>               }
>>
>> @@ -64,7 +77,7 @@ void of_register_i2c_devices(struct i2c_adapter *adap,
>>               of_node_get(node);
>>       }
>>  }
>> -EXPORT_SYMBOL(of_register_i2c_devices);
>> +EXPORT_SYMBOL(of_i2c_register_devices);
>>
>>  static int of_dev_node_match(struct device *dev, void *data)
>>  {
>> @@ -76,8 +89,7 @@ struct i2c_client *of_find_i2c_device_by_node(struct device_node *node)
>>  {
>>       struct device *dev;
>>
>> -     dev = bus_find_device(&i2c_bus_type, NULL, node,
>> -                                      of_dev_node_match);
>> +     dev = bus_find_device(&i2c_bus_type, NULL, node, of_dev_node_match);
>
> This change looks unrelated to me; where was this changed?

You're right; unrelated whitespace damage. I'll remove.

g.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/