linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dejin Zheng <zhengdejin5@gmail.com>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: corbet@lwn.net, gregkh@linuxfoundation.org, rafael@kernel.org,
	f.fainelli@gmail.com, linux-doc@vger.kernel.org,
	linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michal Simek <michal.simek@xilinx.com>,
	Wolfram Sang <wsa@the-dreams.de>,
	Linus Walleij <linus.walleij@linaro.org>
Subject: Re: [PATCH v4 2/2] i2c: busses: convert to devm_platform_request_irq()
Date: Wed, 22 Jul 2020 22:05:27 +0800	[thread overview]
Message-ID: <20200722140527.GB8725@nuc8i5> (raw)
In-Reply-To: <3228833.Xz71LAOI96@diego>

On Fri, Jul 17, 2020 at 09:11:52PM +0200, Heiko Stübner wrote:
> Am Freitag, 17. Juli 2020, 18:11:58 CEST schrieb Dejin Zheng:
> > Use devm_platform_request_irq() to simplify code, and it contains
> > platform_get_irq() and devm_request_irq().
> > 
> > Cc: Michal Simek <michal.simek@xilinx.com>
> > Cc: Wolfram Sang <wsa@the-dreams.de>
> > Signed-off-by: Dejin Zheng <zhengdejin5@gmail.com>
> > Acked-by: Linus Walleij <linus.walleij@linaro.org>
> > Acked-by: Michal Simek <michal.simek@xilinx.com>
> 
> 
> Rockchip part (i2c-rk3x):
> Reviewed-by: Heiko Stuebner <heiko@sntech.de>
>
Heiko, Thanks a lot.

BR,
Dejin
> > diff --git a/drivers/i2c/busses/i2c-rk3x.c b/drivers/i2c/busses/i2c-rk3x.c
> > index 8e3cc85d1921..1f0ac69c5774 100644
> > --- a/drivers/i2c/busses/i2c-rk3x.c
> > +++ b/drivers/i2c/busses/i2c-rk3x.c
> > @@ -1227,7 +1227,6 @@ static int rk3x_i2c_probe(struct platform_device *pdev)
> >  	int ret = 0;
> >  	int bus_nr;
> >  	u32 value;
> > -	int irq;
> >  	unsigned long clk_rate;
> >  
> >  	i2c = devm_kzalloc(&pdev->dev, sizeof(struct rk3x_i2c), GFP_KERNEL);
> > @@ -1289,17 +1288,10 @@ static int rk3x_i2c_probe(struct platform_device *pdev)
> >  		}
> >  	}
> >  
> > -	/* IRQ setup */
> > -	irq = platform_get_irq(pdev, 0);
> > -	if (irq < 0)
> > -		return irq;
> > -
> > -	ret = devm_request_irq(&pdev->dev, irq, rk3x_i2c_irq,
> > -			       0, dev_name(&pdev->dev), i2c);
> > -	if (ret < 0) {
> > -		dev_err(&pdev->dev, "cannot request IRQ\n");
> > +	ret = devm_platform_request_irq(pdev, 0, NULL, rk3x_i2c_irq,
> > +					0, dev_name(&pdev->dev), i2c);
> > +	if (ret < 0)
> >  		return ret;
> > -	}
> >  
> >  	platform_set_drvdata(pdev, i2c);
> >  
> 
> 
> 
> 

      reply	other threads:[~2020-07-22 14:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-17 16:11 [PATCH v4 2/2] i2c: busses: convert to devm_platform_request_irq() Dejin Zheng
2020-07-17 19:11 ` Heiko Stübner
2020-07-22 14:05   ` Dejin Zheng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200722140527.GB8725@nuc8i5 \
    --to=zhengdejin5@gmail.com \
    --cc=corbet@lwn.net \
    --cc=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=heiko@sntech.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=rafael@kernel.org \
    --cc=wsa@the-dreams.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).