diff mbox

[2/2] mfd: twl-core: convert to module_i2c_driver()

Message ID 1366723151-23209-3-git-send-email-grygorii.strashko@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Grygorii Strashko April 23, 2013, 1:19 p.m. UTC
Shift TWL initialization to module/device init layer, because I2C now is
not initialized on subsys init layer and shifted to module/device init
layer instead.

The I2C <--> TWL dependency should be resolved in drivers/Makefile now.

Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: linux-omap@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
 drivers/mfd/twl-core.c |   12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

Comments

Samuel Ortiz May 16, 2013, 10:17 p.m. UTC | #1
Hi Grygorii,

On Tue, Apr 23, 2013 at 04:19:10PM +0300, Grygorii Strashko wrote:
> Shift TWL initialization to module/device init layer, because I2C now is
> not initialized on subsys init layer and shifted to module/device init
> layer instead.
> 
> The I2C <--> TWL dependency should be resolved in drivers/Makefile now.
>
> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> Cc: linux-omap@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> 
> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> ---
>  drivers/mfd/twl-core.c |   12 +-----------
>  1 file changed, 1 insertion(+), 11 deletions(-)
I applied this one to mfd-next for now, and will move it to mfd-fixes if
someone confirms that this is indeed a fix.

Cheers,
Samuel.
Tony Lindgren May 16, 2013, 10:58 p.m. UTC | #2
* Samuel Ortiz <sameo@linux.intel.com> [130516 15:22]:
> Hi Grygorii,
> 
> On Tue, Apr 23, 2013 at 04:19:10PM +0300, Grygorii Strashko wrote:
> > Shift TWL initialization to module/device init layer, because I2C now is
> > not initialized on subsys init layer and shifted to module/device init
> > layer instead.
> > 
> > The I2C <--> TWL dependency should be resolved in drivers/Makefile now.
> >
> > Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
> > Cc: linux-omap@vger.kernel.org
> > Cc: linux-kernel@vger.kernel.org
> > 
> > Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
> > ---
> >  drivers/mfd/twl-core.c |   12 +-----------
> >  1 file changed, 1 insertion(+), 11 deletions(-)
> I applied this one to mfd-next for now, and will move it to mfd-fixes if
> someone confirms that this is indeed a fix.

Thanks, AFAIK it can wait until v3.11 merge window.

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Grygorii Strashko May 17, 2013, 10:46 a.m. UTC | #3
On 05/17/2013 01:58 AM, Tony Lindgren wrote:
> * Samuel Ortiz <sameo@linux.intel.com> [130516 15:22]:
>> Hi Grygorii,
>>
>> On Tue, Apr 23, 2013 at 04:19:10PM +0300, Grygorii Strashko wrote:
>>> Shift TWL initialization to module/device init layer, because I2C now is
>>> not initialized on subsys init layer and shifted to module/device init
>>> layer instead.
>>>
>>> The I2C <--> TWL dependency should be resolved in drivers/Makefile now.
>>>
>>> Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
>>> Cc: linux-omap@vger.kernel.org
>>> Cc: linux-kernel@vger.kernel.org
>>>
>>> Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
>>> ---
>>>   drivers/mfd/twl-core.c |   12 +-----------
>>>   1 file changed, 1 insertion(+), 11 deletions(-)
>> I applied this one to mfd-next for now, and will move it to mfd-fixes if
>> someone confirms that this is indeed a fix.
> Thanks, AFAIK it can wait until v3.11 merge window.
>
> Regards,
>
> Tony
Thanks, it's optimization which reduces the number of deferred probes at 
boot

Regards,
-grygorii


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
index 4f3baad..f01340d 100644
--- a/drivers/mfd/twl-core.c
+++ b/drivers/mfd/twl-core.c
@@ -1347,17 +1347,7 @@  static struct i2c_driver twl_driver = {
 	.remove		= twl_remove,
 };
 
-static int __init twl_init(void)
-{
-	return i2c_add_driver(&twl_driver);
-}
-subsys_initcall(twl_init);
-
-static void __exit twl_exit(void)
-{
-	i2c_del_driver(&twl_driver);
-}
-module_exit(twl_exit);
+module_i2c_driver(twl_driver);
 
 MODULE_AUTHOR("Texas Instruments, Inc.");
 MODULE_DESCRIPTION("I2C Core interface for TWL");