Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp2221918ybh; Fri, 17 Jul 2020 12:13:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/IWnuZIgae7Pf6M11gd4wiZZVG0EqVe1KB002V1JYcbAR2FEHMXkn3AD/5aZNoxamuOir X-Received: by 2002:a17:906:da0f:: with SMTP id fi15mr9625600ejb.237.1595013234348; Fri, 17 Jul 2020 12:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595013234; cv=none; d=google.com; s=arc-20160816; b=tO8H0QHbxstADqBcSFas15HLWdkcCvhXEdHnUkf5b58DXdEtXFxhLSvdcwTOlyIlUo 960KrLUaGR0mHsB4zpGZWcVRb4OxRfYsoBa7xRhBUmXl3Wa/Wi1df+0qmrxsQohj16fN tN7X3jY+Be62OpdqBE8SsOYNxCq2OSQcYfQ8pweybD0uc3LYZIQirUttg3gRbZNpxCCm OhdBuZimowWjVJm889PgAaHmBtmxKNFG4P9PwyRveHf22R8iggYvS43c4GlxbrUroSnG fr/pL/3hlqzivvCo1WkaNoe6kqb4tUFUYxl7EJTe37/tvQISiVnX4uj8B+muqVMPvFB7 PQcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ZhK3AJxkYtBlTIJwgsUakVLYKJbVr1Mzol35iLFBscY=; b=plxmd0i6BRW2iM4CPpVtvmVbfCohlQkg2ngoZ6o1Q4b7ULLYZB9JDU4+A8SfJzm3hA c1bEw/ZR8Eom2AO1i27cX0AYMTnnhsFeZT8VcfHAY3SeQkJuXED0tthJLwCTEReef27t gLZMyqWyncNFBSKB18Z18f3paxrCkiT7l2th80dBYSTYHecUtBb2ryNqBNTvyLis536F 1vz6h2GVEfEZPdTqWzyYe0aQU1LvBGRnu1RVrffnu8C5fdjX7QFPhtd5YK0YZtuRPPu1 /YYQeeCkr2e3gGvYTphtqWybAJBYCLPerGHYHGtsbls/SSr/vjp95pWGEryObYbtHOCO gbmw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w22si5543706eju.670.2020.07.17.12.13.31; Fri, 17 Jul 2020 12:13:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728439AbgGQTL6 (ORCPT + 99 others); Fri, 17 Jul 2020 15:11:58 -0400 Received: from gloria.sntech.de ([185.11.138.130]:58900 "EHLO gloria.sntech.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727978AbgGQTL5 (ORCPT ); Fri, 17 Jul 2020 15:11:57 -0400 Received: from ip5f5aa64a.dynamic.kabel-deutschland.de ([95.90.166.74] helo=diego.localnet) by gloria.sntech.de with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jwVlw-0008Ng-WB; Fri, 17 Jul 2020 21:11:53 +0200 From: Heiko =?ISO-8859-1?Q?St=FCbner?= To: Dejin Zheng 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 , Wolfram Sang , Linus Walleij Subject: Re: [PATCH v4 2/2] i2c: busses: convert to devm_platform_request_irq() Date: Fri, 17 Jul 2020 21:11:52 +0200 Message-ID: <3228833.Xz71LAOI96@diego> In-Reply-To: <20200717161158.11516-1-zhengdejin5@gmail.com> References: <20200717161158.11516-1-zhengdejin5@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > Cc: Wolfram Sang > Signed-off-by: Dejin Zheng > Acked-by: Linus Walleij > Acked-by: Michal Simek Rockchip part (i2c-rk3x): Reviewed-by: Heiko Stuebner > 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); >