On Sat, Aug 6, 2011 at 12:15 AM, Rob Herring <[email protected]> wrote:
> Grant,
>
> On 08/05/2011 05:56 PM, Grant Likely wrote:
>> On Fri, Aug 05, 2011 at 04:24:27PM -0500, Rob Herring wrote:
>>> From: Rob Herring <[email protected]>
>>>
>>> This simplifies i2c drivers by removing calls to of_i2c_register_devices
>>> and resolves a module circular dependency between i2c-core and of_i2c.
>>>
>>> Signed-off-by: Rob Herring <[email protected]>
>>> Cc: Grant Likely <[email protected]>
>>> Cc: Jean Delvare <[email protected]>
>>> Cc: Ben Dooks <[email protected]>
>>> Cc: [email protected]
>>> ---
>>>  arch/powerpc/platforms/44x/warp.c |    1 -
>>>  drivers/i2c/i2c-core.c            |   85 +++++++++++++++++++++++++++++++-
>>>  drivers/of/Makefile               |    1 -
>>>  drivers/of/of_i2c.c               |   97 
>>> -------------------------------------
>>>  include/linux/i2c.h               |    4 ++
>>>  include/linux/of_i2c.h            |   30 -----------
>>>  6 files changed, 87 insertions(+), 131 deletions(-)
>>>  delete mode 100644 drivers/of/of_i2c.c
>>>  delete mode 100644 include/linux/of_i2c.h
>>>
>>> diff --git a/arch/powerpc/platforms/44x/warp.c 
>>> b/arch/powerpc/platforms/44x/warp.c
>>> index 8f77139..9327ccf 100644
>>> --- a/arch/powerpc/platforms/44x/warp.c
>>> +++ b/arch/powerpc/platforms/44x/warp.c
>>> @@ -16,7 +16,6 @@
>>>  #include <linux/interrupt.h>
>>>  #include <linux/delay.h>
>>>  #include <linux/of_gpio.h>
>>> -#include <linux/of_i2c.h>
>>>  #include <linux/slab.h>
>>>
>>>  #include <asm/machdep.h>
>>> diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
>>> index 011e195..478c7f2 100644
>>> --- a/drivers/i2c/i2c-core.c
>>> +++ b/drivers/i2c/i2c-core.c
>>> @@ -22,7 +22,10 @@
>>>     SMBus 2.0 support by Mark Studebaker <[email protected]> and
>>>     Jean Delvare <[email protected]>
>>>     Mux support by Rodolfo Giometti <[email protected]> and
>>> -   Michael Lawnick <[email protected]> */
>>> +   Michael Lawnick <[email protected]>
>>> +   OF support by Jochen Friedrich <[email protected]> and
>>> +   Jon Smirl <[email protected]>
>>> +   */
>>>
>>>  #include <linux/module.h>
>>>  #include <linux/kernel.h>
>>> @@ -32,7 +35,6 @@
>>>  #include <linux/init.h>
>>>  #include <linux/idr.h>
>>>  #include <linux/mutex.h>
>>> -#include <linux/of_i2c.h>
>>>  #include <linux/of_device.h>
>>>  #include <linux/completion.h>
>>>  #include <linux/hardirq.h>
>>> @@ -790,6 +792,85 @@ static void i2c_scan_static_board_info(struct 
>>> i2c_adapter *adapter)
>>>      up_read(&__i2c_board_lock);
>>>  }
>>>
>>> +#ifdef CONFIG_OF_I2C
>>
>> I think this becomes simply "#ifdef CONFIG_OF" since CONFIG_I2C is implied 
>> at this point.
>
> I was going to remove CONFIG_OF_I2C altogether, but it depends on !SPARC
> so I thought it should be kept.

Good point.  I keep forgetting that SPARC has different behaviour.

g.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to