diff mbox

[v2] i2c: designware: Suppress error message if platform_get_irq() < 0

Message ID 1425891792-9248-1-git-send-email-abrodkin@synopsys.com
State Accepted
Headers show

Commit Message

Alexey Brodkin March 9, 2015, 9:03 a.m. UTC
As discussed here https://lkml.org/lkml/2015/3/3/568 and here
https://lkml.org/lkml/2015/3/3/453 we're looking forward for
implementing warnings and errors outputs right in platform_get_irq()
instead of having all kind of different outputs in each and every driver
that uses platform_get_irq().

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Vineet Gupta <vgupta@synopsys.com>
Cc: Christian Ruppert <christian.ruppert@abilis.com>
Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Wolfram Sang <wsa@the-dreams.de>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/i2c/busses/i2c-designware-platdrv.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Mika Westerberg March 9, 2015, 11:23 a.m. UTC | #1
On Mon, Mar 09, 2015 at 12:03:12PM +0300, Alexey Brodkin wrote:
> As discussed here https://lkml.org/lkml/2015/3/3/568 and here
> https://lkml.org/lkml/2015/3/3/453 we're looking forward for
> implementing warnings and errors outputs right in platform_get_irq()
> instead of having all kind of different outputs in each and every driver
> that uses platform_get_irq().
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Cc: Christian Ruppert <christian.ruppert@abilis.com>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>

Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Christian Ruppert March 9, 2015, 4:34 p.m. UTC | #2
Alexey Brodkin <Alexey.Brodkin@synopsys.com> wrote on 03/09/2015 10:03:12 
AM:

> From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
> To: linux-i2c@vger.kernel.org, 
> Cc: linux-kernel@vger.kernel.org, Alexey Brodkin 
> <Alexey.Brodkin@synopsys.com>, Vineet Gupta 
> <Vineet.Gupta1@synopsys.com>, Christian Ruppert 
> <christian.ruppert@abilis.com>, Mika Westerberg 
> <mika.westerberg@linux.intel.com>, Wolfram Sang <wsa@the-dreams.de>,
> Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> Date: 03/09/2015 10:03 AM
> 
> As discussed here https://lkml.org/lkml/2015/3/3/568 and here
> https://lkml.org/lkml/2015/3/3/453 we're looking forward for
> implementing warnings and errors outputs right in platform_get_irq()
> instead of having all kind of different outputs in each and every driver
> that uses platform_get_irq().
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Cc: Christian Ruppert <christian.ruppert@abilis.com>
Acked-by: Christian Ruppert <christian.ruppert@alitech.com>

Please note that my email address has changed and use the alitech one in 
future. The abilis address might be switched off soon.

> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/i2c/busses/i2c-designware-platdrv.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/
> i2c/busses/i2c-designware-platdrv.c
> index c270f5f..fa4e2b5 100644
> --- a/drivers/i2c/busses/i2c-designware-platdrv.c
> +++ b/drivers/i2c/busses/i2c-designware-platdrv.c
> @@ -143,10 +143,8 @@ static int dw_i2c_probe(struct platform_device 
*pdev)
>     u32 clk_freq, ht = 0;
> 
>     irq = platform_get_irq(pdev, 0);
> -   if (irq < 0) {
> -      dev_err(&pdev->dev, "no irq resource?\n");
> -      return irq; /* -ENXIO */
> -   }
> +   if (irq < 0)
> +      return irq;
> 
>     dev = devm_kzalloc(&pdev->dev, sizeof(struct dw_i2c_dev), 
GFP_KERNEL);
>     if (!dev)
> -- 
> 2.1.0
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang March 15, 2015, 10:26 a.m. UTC | #3
On Mon, Mar 09, 2015 at 12:03:12PM +0300, Alexey Brodkin wrote:
> As discussed here https://lkml.org/lkml/2015/3/3/568 and here
> https://lkml.org/lkml/2015/3/3/453 we're looking forward for
> implementing warnings and errors outputs right in platform_get_irq()
> instead of having all kind of different outputs in each and every driver
> that uses platform_get_irq().
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Cc: Vineet Gupta <vgupta@synopsys.com>
> Cc: Christian Ruppert <christian.ruppert@abilis.com>
> Cc: Mika Westerberg <mika.westerberg@linux.intel.com>
> Cc: Wolfram Sang <wsa@the-dreams.de>
> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Reworded the commit message to state the initial reason for this patch
and applied to for-next, thanks!
diff mbox

Patch

diff --git a/drivers/i2c/busses/i2c-designware-platdrv.c b/drivers/i2c/busses/i2c-designware-platdrv.c
index c270f5f..fa4e2b5 100644
--- a/drivers/i2c/busses/i2c-designware-platdrv.c
+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
@@ -143,10 +143,8 @@  static int dw_i2c_probe(struct platform_device *pdev)
 	u32 clk_freq, ht = 0;
 
 	irq = platform_get_irq(pdev, 0);
-	if (irq < 0) {
-		dev_err(&pdev->dev, "no irq resource?\n");
-		return irq; /* -ENXIO */
-	}
+	if (irq < 0)
+		return irq;
 
 	dev = devm_kzalloc(&pdev->dev, sizeof(struct dw_i2c_dev), GFP_KERNEL);
 	if (!dev)