Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp4293643pxk; Tue, 22 Sep 2020 15:57:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxJxq+Sh31Ss4YIacaj/gfctQA2BUCwj4vToYJ6mdTrKnemMwTzFcZKQeiaOSC0cEfSpxxk X-Received: by 2002:aa7:d58e:: with SMTP id r14mr6854421edq.52.1600815471051; Tue, 22 Sep 2020 15:57:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600815471; cv=none; d=google.com; s=arc-20160816; b=PIBZ7EE0qnNnVq+cVRyk0HMP5lOuXi6UYBubktrAcu76T23GdfJUJC0/S1MfDYGQ2Q YGsX4tDmsNeSHATpiVnVmlDCfAhD3vMxStTPFm0alRZUQeGCucc0fYEnb+0jCsR9Op+X 9wNswj2+YpiVvxslYYXEJ1RrI9fPp4sGp3QjHIKW4Xk5ddw4jzliHWkOJxmq0qQM4+M1 wD7+tLMcojBSsDFIe++Ed4pjM9hWcvRBZIhMYg0BMwL2NYWhYvDYgWwU0PRjMvXSsMzr 471hSXMGNsi/0ashGM66dQsZUHUHlqtW5y56cEnTCClBt85z360Qgm+xz2Eq4uv+3Qn2 3JkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QbR8Wg7SiLjwizAtD6cV/clscat69GMg31E2yK/bKZU=; b=bL3uQMavVhpXrg7IGQfWVq7KiJr/Hz0k6OaQwq5XIU9l8rlso+Znw5BLQMQxJpNrL7 +Ssize35rj6XJ9NsKs9yA06xqRmZrmSWu8jVT2mZ+pM4irM/bVXJPUTyLT+lj/N7HM76 5SSXn8UK0USnO6c28BccJW7Z2bnmLz0vKaKX+wbY11BaghJoLLxeJftDT2iNphQElsHK z0dNFWJv/cepGWfXcWkX3LDa3DGRuW9i7wpFGednNxKJAfIG4D7FN5pjPxmuidOhGy2+ JLfvMz19EImerfG9T37NCF8F8OsuuzsQadn4BgX7INbY858aJHvIJrw8T0EixO4DCpx5 DJ4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hKN5zMf2; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e7si4639539edv.70.2020.09.22.15.57.27; Tue, 22 Sep 2020 15:57:51 -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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hKN5zMf2; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727236AbgIVWyY (ORCPT + 99 others); Tue, 22 Sep 2020 18:54:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58692 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726952AbgIVWwm (ORCPT ); Tue, 22 Sep 2020 18:52:42 -0400 Received: from mail-lf1-x144.google.com (mail-lf1-x144.google.com [IPv6:2a00:1450:4864:20::144]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04D9DC061755; Tue, 22 Sep 2020 15:52:42 -0700 (PDT) Received: by mail-lf1-x144.google.com with SMTP id y2so19834715lfy.10; Tue, 22 Sep 2020 15:52:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QbR8Wg7SiLjwizAtD6cV/clscat69GMg31E2yK/bKZU=; b=hKN5zMf2AIUflu+9/CF3bmsXOcNYHMqHRZGX0QTNQ1BVS3cuEZ1d16e+uW6ylD3q+f KDYDDyY4c5NqYK6EtpBd+jfVzw8FOr2bXNI0VkSA6fUltmi9ut/pAVYyVXhPY1c2bhHE /kjnVlswsybOSUCyO4D94gJhX4cs4MFbeS3dVxlPim2w4WJ6DWzKIJQ8pvQgBnL3kNB/ 5ZJMG6Gsoto7zkg3Y33FFOA5RTIAjOvZ98rsxV7oBAU2qERUGCTYM6BJ5V+MkraJDXGp J+9t7JSsbprU0v3ZJPVhwh7E7NkIKs7H+qC8BDeNbN07aCV2Qda0oyG6a/gijv83LMwH zDYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QbR8Wg7SiLjwizAtD6cV/clscat69GMg31E2yK/bKZU=; b=gPW6MFsI0A0AqdKoGsdo3RPdwwl0AN4Y4ar5XmcaHxhdZelZ3RPyfnLxedDGdedR1n V8xe+IWjsslqARZsFDXJqKdYSmGAC4PTTSalP81dt5D2Usk/Ps1xxsHTv1v/AXks+b7O evPMQLsrtZsFlpcSshtvqI5nwCFgcldQvzDSqXpK31LglV9NLO0GoFvxP5W1OA2Ncg3h 2mdytsW+kuAsRGqX7Mcw832wgSX5J3cvips3+JIH8bOJeo97OA40b7KeSpZTlR4PKD31 oBaKMSX071scSvnnGIWHH1JqdLP6c0z7HpGzjQvdsQ34ZqfWBP1EdR8AowHTmhOKPT0j N2RA== X-Gm-Message-State: AOAM531LfBA1tOKGuL7pG+eYiAkXgu23wtefT/0Q9Egm+7iQahCxIGfT qRtncU7tMFNWmgGZF3sM6VFhoZoifeE= X-Received: by 2002:a19:23c6:: with SMTP id j189mr2572190lfj.79.1600815160449; Tue, 22 Sep 2020 15:52:40 -0700 (PDT) Received: from localhost.localdomain (109-252-170-211.dynamic.spd-mgts.ru. [109.252.170.211]) by smtp.gmail.com with ESMTPSA id l15sm3977588lfk.71.2020.09.22.15.52.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2020 15:52:39 -0700 (PDT) From: Dmitry Osipenko To: Thierry Reding , Jonathan Hunter , Laxman Dewangan , Wolfram Sang , =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= , Andy Shevchenko Cc: linux-i2c@vger.kernel.org, linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v8 11/32] i2c: tegra: Use platform_get_irq() Date: Wed, 23 Sep 2020 01:51:34 +0300 Message-Id: <20200922225155.10798-12-digetx@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200922225155.10798-1-digetx@gmail.com> References: <20200922225155.10798-1-digetx@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use common helper for retrieval of the interrupt number in order to make code cleaner. Note that platform_get_irq() prints error message by itself. Reviewed-by: Michał Mirosław Acked-by: Thierry Reding Tested-by: Thierry Reding Signed-off-by: Dmitry Osipenko --- drivers/i2c/busses/i2c-tegra.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/i2c/busses/i2c-tegra.c b/drivers/i2c/busses/i2c-tegra.c index c2bbdf92b11f..505b5d37077d 100644 --- a/drivers/i2c/busses/i2c-tegra.c +++ b/drivers/i2c/busses/i2c-tegra.c @@ -1684,12 +1684,9 @@ static int tegra_i2c_probe(struct platform_device *pdev) base_phys = res->start; - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res) { - dev_err(&pdev->dev, "no irq resource\n"); - return -EINVAL; - } - irq = res->start; + irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; div_clk = devm_clk_get(&pdev->dev, "div-clk"); if (IS_ERR(div_clk)) { -- 2.27.0