Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp13013635ybl; Sun, 29 Dec 2019 02:46:10 -0800 (PST) X-Google-Smtp-Source: APXvYqxxdPlSXqYClpqrtS+Jd6OmCoImNU0zDmpeMBEVBHl1iqq18ASM1Fr/qoBN+y29WecDZmUP X-Received: by 2002:a05:6830:2009:: with SMTP id e9mr15407994otp.160.1577616369905; Sun, 29 Dec 2019 02:46:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577616369; cv=none; d=google.com; s=arc-20160816; b=VcAWl8wC/GKhmX4CnyJ/pgfgoZYYRdxbdxbGK940juiBN7pjHU9+dFXnfySvfiKbVp EyeVTmWkA9XeDqzpV4PQaNLJr/OGAxGbz8vK9aY2r2Oavfjfo5BfGFjKjtZBrpuP2au9 V80WYZfPJnLu56dqEkR9YUkbxMrhdLG1dN3IgTVYHUWrL64a5HU1ZrIcoVRg1VRgroN0 U9AWfKhpt9jZ/TdldqihjMt+jPhMC2aR2E8yei5Bpx8ZpfNqnoS2bVsJrd2M6gPFByaN 6wjGsCbDyyP/cuYbqiT0+3/1XmOtKKHCGnQ0uxnLiUETd85hgNvLNIoEXLDfdEaJkGHM lR+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=KfH/WTQPO3RAECd+zAOPLsSZgZBZzVlcd2UC7GE6hHI=; b=wD8V2D1dg96Qjq9pn8hEED+HZenJyji21U82B13KrqKy/fGibHB2myjxoGZtVD/aoT Xm8WbL+lMlgPIPFJx3rC9o9/RUShZS2xsLTGZNB6GINXkDAUGLOcIxRpiwgiIZVOw3nX oP+VKvH8Lsskyia82DZJFPfASCbbpCg91w2SdlBGv6S0y598AEAsEl+xILqfc6E4Mkr+ ujFa9CrkG/1qhtvnDDV60SIJmbeuuBTEsEPqBJ2W2fo0YrII/iF62Dda97QW+RxeUsIE pmfg57ApzE8uIW2pf92SiAF6/vYQ/wPcC/i5ZM1zYcvv2cLkxfpELoD/2KWHfpBL1qEw 5Xmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="FDe/04/l"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id 8si22138817otd.274.2019.12.29.02.45.32; Sun, 29 Dec 2019 02:46:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="FDe/04/l"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1726543AbfL2Kna (ORCPT + 99 others); Sun, 29 Dec 2019 05:43:30 -0500 Received: from mail-pf1-f196.google.com ([209.85.210.196]:41588 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726476AbfL2Kn3 (ORCPT ); Sun, 29 Dec 2019 05:43:29 -0500 Received: by mail-pf1-f196.google.com with SMTP id w62so16975621pfw.8; Sun, 29 Dec 2019 02:43:29 -0800 (PST) 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; bh=KfH/WTQPO3RAECd+zAOPLsSZgZBZzVlcd2UC7GE6hHI=; b=FDe/04/l9yK8IA/6QqwpbWhZUzluJkbsGQjywcYB2FDblu1uRPpIv4NCxRwV4Zy143 dSbJ49VE1dz51O4kMA8aMGgZVhFjI1UU3wPppXOWgyF74JppWCQGJR+aKcdx9fh8ZMrN zWj5oS8YJ1K7E7cYWTLaUN450rUnMAQeOKfRUszQIDbB1Hl02+WWckG1Lx+UwRJ0a6sz evUsxsQXPN0CcnC4JQSeUenOVRFSLxR02hr13KRbvtpJbgjoFB1X9oBlzmQuJ82uWPKY 36z7ZanEDTdBVF+rQe8I/bzw06QseB0BlZflyQCyxejJg/5KUq4HKR6F43Rfh8L2cbit z+gA== 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; bh=KfH/WTQPO3RAECd+zAOPLsSZgZBZzVlcd2UC7GE6hHI=; b=hsEt9v+5Vu7bRNZb52WyiA0S/4pcmPz6cj8dEI5c2qA6ecwJsfvDz2xZVgaReKp0uJ nMA2mdU7WBqBJLpfdfyVqO5ecq7vvdkQvSJDoLIufQgICAD9yzY3DrWflDIGCTIpIvq8 OUUIDokTphRO1Jq4MXLC/RKVr+5mxr8kzIuB4s1/XLaF9qHvyAkuQP+EPee47Wjk2p9S j9bVhiVg5F5WzT/65RMGX5q/M2YlsEnbH4kzG0g3EJlbaAeH45jlumxqIk7b7gCkZCP7 SIzxYm6liZECS8zrrSYtBX4HaXXtb5FWiBdHdlvfe0T3mOzMNOk7tSkNymW4p3jSPjDC 2Qrg== X-Gm-Message-State: APjAAAUpWWkd5mPmPM0aOcEsT8KDOen6tGr/EpxuBdCkDiouZuLOH1DF OkhdaB8BJ7LMUTY0qs/VwEs= X-Received: by 2002:a63:d00f:: with SMTP id z15mr65191432pgf.143.1577616209060; Sun, 29 Dec 2019 02:43:29 -0800 (PST) Received: from localhost ([2001:19f0:6001:12c8:5400:2ff:fe72:6403]) by smtp.gmail.com with ESMTPSA id b128sm43732589pga.43.2019.12.29.02.43.28 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 29 Dec 2019 02:43:28 -0800 (PST) From: Yangtao Li To: corbet@lwn.net, gregkh@linuxfoundation.org, bgolaszewski@baylibre.com, arnd@arndb.de, sboyd@kernel.org, mchehab+samsung@kernel.org, matti.vaittinen@fi.rohmeurope.com, phil.edworthy@renesas.com, suzuki.poulose@arm.com, saravanak@google.com, heikki.krogerus@linux.intel.com, dan.j.williams@intel.com, joe@perches.com, jeffrey.t.kirsher@intel.com, mans@mansr.com, tglx@linutronix.de, hdegoede@redhat.com, akpm@linux-foundation.org, ulf.hansson@linaro.org, ztuowen@gmail.com, sergei.shtylyov@cogentembedded.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Yangtao Li Subject: [PATCH] platform: goldfish: pipe: switch to platform_get_irq Date: Sun, 29 Dec 2019 10:43:24 +0000 Message-Id: <20191229104325.10132-2-tiny.windzz@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191229104325.10132-1-tiny.windzz@gmail.com> References: <20191229104325.10132-1-tiny.windzz@gmail.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org platform_get_resource(pdev, IORESOURCE_IRQ) is not recommended for requesting IRQ's resources, as they can be not ready yet. Using platform_get_irq() instead is preferred for getting IRQ even if it was not retrieved earlier. Signed-off-by: Yangtao Li --- drivers/platform/goldfish/goldfish_pipe.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/platform/goldfish/goldfish_pipe.c b/drivers/platform/goldfish/goldfish_pipe.c index cef0133aa47a..a1ebaec6eea9 100644 --- a/drivers/platform/goldfish/goldfish_pipe.c +++ b/drivers/platform/goldfish/goldfish_pipe.c @@ -913,11 +913,9 @@ static int goldfish_pipe_probe(struct platform_device *pdev) return -EINVAL; } - r = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!r) - return -EINVAL; - - dev->irq = r->start; + dev->irq = platform_get_irq(pdev, 0); + if (dev->irq < 0) + return dev->irq; /* * Exchange the versions with the host device -- 2.17.1