Re: [PATCH v2 1/7] i2c-designware: move to managed functions (devm_*)

2013-04-15 Thread Wolfram Sang
On Wed, Apr 10, 2013 at 01:36:36PM +0300, Mika Westerberg wrote: > From: Andy Shevchenko > > This makes the error handling much more simpler than open-coding everything > and in addition makes the probe function smaller and tidier. > > Signed-off-by: Andy Shevchenko > Signed-off-by: Mika

Re: [PATCH v2 1/7] i2c-designware: move to managed functions (devm_*)

2013-04-15 Thread Wolfram Sang
On Wed, Apr 10, 2013 at 01:36:36PM +0300, Mika Westerberg wrote: From: Andy Shevchenko andriy.shevche...@linux.intel.com This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller and tidier. Signed-off-by: Andy Shevchenko

[PATCH v2 1/7] i2c-designware: move to managed functions (devm_*)

2013-04-10 Thread Mika Westerberg
From: Andy Shevchenko This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller and tidier. Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg --- Changes to v1: - dropped redundant dev_err() after

[PATCH v2 1/7] i2c-designware: move to managed functions (devm_*)

2013-04-10 Thread Mika Westerberg
From: Andy Shevchenko andriy.shevche...@linux.intel.com This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller and tidier. Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com Signed-off-by: Mika Westerberg

Re: [1/7] i2c-designware: move to managed functions (devm_*)

2013-04-09 Thread Wolfram Sang
> > > i2c_dw_disable_int(dev); > > > - r = request_irq(dev->irq, i2c_dw_isr, IRQF_SHARED, pdev->name, dev); > > > + r = devm_request_irq(>dev, dev->irq, i2c_dw_isr, IRQF_SHARED, > > > + pdev->name, dev); > > > > Is it ensured that no interrupts will happen during remove?

Re: [1/7] i2c-designware: move to managed functions (devm_*)

2013-04-09 Thread Mika Westerberg
On Tue, Apr 09, 2013 at 11:00:32AM +0200, Wolfram Sang wrote: > > > @@ -108,32 +108,27 @@ static int dw_i2c_probe(struct platform_device *pdev) > > return irq; /* -ENXIO */ > > } > > > > - ioarea = request_mem_region(mem->start, resource_size(mem), > > -

Re: [1/7] i2c-designware: move to managed functions (devm_*)

2013-04-09 Thread Wolfram Sang
> @@ -108,32 +108,27 @@ static int dw_i2c_probe(struct platform_device *pdev) > return irq; /* -ENXIO */ > } > > - ioarea = request_mem_region(mem->start, resource_size(mem), > - pdev->name); > - if (!ioarea) { > - dev_err(>dev, "I2C

Re: [1/7] i2c-designware: move to managed functions (devm_*)

2013-04-09 Thread Wolfram Sang
@@ -108,32 +108,27 @@ static int dw_i2c_probe(struct platform_device *pdev) return irq; /* -ENXIO */ } - ioarea = request_mem_region(mem-start, resource_size(mem), - pdev-name); - if (!ioarea) { - dev_err(pdev-dev, I2C region

Re: [1/7] i2c-designware: move to managed functions (devm_*)

2013-04-09 Thread Mika Westerberg
On Tue, Apr 09, 2013 at 11:00:32AM +0200, Wolfram Sang wrote: @@ -108,32 +108,27 @@ static int dw_i2c_probe(struct platform_device *pdev) return irq; /* -ENXIO */ } - ioarea = request_mem_region(mem-start, resource_size(mem), - pdev-name); -

Re: [1/7] i2c-designware: move to managed functions (devm_*)

2013-04-09 Thread Wolfram Sang
i2c_dw_disable_int(dev); - r = request_irq(dev-irq, i2c_dw_isr, IRQF_SHARED, pdev-name, dev); + r = devm_request_irq(pdev-dev, dev-irq, i2c_dw_isr, IRQF_SHARED, + pdev-name, dev); Is it ensured that no interrupts will happen during remove? Because the adapter

Re: [PATCH 1/7] i2c-designware: move to managed functions (devm_*)

2013-04-08 Thread Mika Westerberg
Hi Wolfram, Any comments on this series? Could you consider merging these for 3.10? Thanks. On Thu, Mar 21, 2013 at 02:09:54PM +0200, Mika Westerberg wrote: > From: Andy Shevchenko > > This makes the error handling much more simpler than open-coding everything > and in addition makes the

Re: [PATCH 1/7] i2c-designware: move to managed functions (devm_*)

2013-04-08 Thread Mika Westerberg
Hi Wolfram, Any comments on this series? Could you consider merging these for 3.10? Thanks. On Thu, Mar 21, 2013 at 02:09:54PM +0200, Mika Westerberg wrote: From: Andy Shevchenko andriy.shevche...@linux.intel.com This makes the error handling much more simpler than open-coding everything

[PATCH 1/7] i2c-designware: move to managed functions (devm_*)

2013-03-21 Thread Mika Westerberg
From: Andy Shevchenko This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller and tidier. Signed-off-by: Andy Shevchenko Signed-off-by: Mika Westerberg --- drivers/i2c/busses/i2c-designware-platdrv.c | 73

[PATCH 1/7] i2c-designware: move to managed functions (devm_*)

2013-03-21 Thread Mika Westerberg
From: Andy Shevchenko andriy.shevche...@linux.intel.com This makes the error handling much more simpler than open-coding everything and in addition makes the probe function smaller and tidier. Signed-off-by: Andy Shevchenko andriy.shevche...@linux.intel.com Signed-off-by: Mika Westerberg