From patchwork Wed Dec 15 22:53:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 12696354 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 48638C433FE for ; Wed, 15 Dec 2021 22:55:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=IMN8elnzInwZV24H2jmAGs3p7bVMVmeaY80lhlYS8iM=; b=3Viy07FtifOLGu AspY3wjF6oE9x2+XaXAivHm+AUjcogVrbCDUN8SORUUMsWwbqyKZEvMFbJ/jzh18rm0SOVe6Z7bqi pLtY8lcJJHwyheoCIvWJtEWPdaiMfO0tN+BTi81/Z7kH4xYYfXf9Nwx+14I4C/SGJFkoofPy5P6bS jLQp3+DKJN01K3dZ1jPtYaANqHmOZG35hdKdwcQzeqiHgrvrPvFTU4HrFpmz0Y19kNvtyojJptZFv aX/D8oJh1X+f7kgTDaalv6xaqJ9Nr15eKbiPKZPyGDWO2tXJNgTHPZt9ko9LQeZiTl6HbV86lP6oo HNm/O/IJSntUu8p5rDQw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxdA4-0032Kc-Hw; Wed, 15 Dec 2021 22:54:12 +0000 Received: from mail-oi1-f174.google.com ([209.85.167.174]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mxdA1-0032Ix-C6 for linux-arm-kernel@lists.infradead.org; Wed, 15 Dec 2021 22:54:10 +0000 Received: by mail-oi1-f174.google.com with SMTP id n66so33769851oia.9 for ; Wed, 15 Dec 2021 14:54:08 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=1rTeo0olahvplgpRoUTrL6H+6X7kg0uXokwNI+aGFZ0=; b=ch0IU/T4IIXXEZSCwUR/JBtuZzjrbheK/AxYHpnZI5j1INyyAlov697BQ1BAf+Lf93 gLk51qdMyIOKPgGqnPDZOdqrovzcCLAXQndD4C5ajGjfHa8W9tMdFZCVQbIBGCtm00kj liJZ1ieIrNwNGWWgSh2UIfVXN9jkBplDy9tPtXnvKQKEGn1AaxbVsUfAvYXsiAk+lzU8 pj1y2DinWRIZSeOJcHjb1vb67Z+JvkJlGn1SrlNXIoWqFmq4L9O7Jtt+A9bR7NNCd2Aq AOffVEQWporr1djywBljAllTRKkMZL6oXiFzYdN+TZO4oHURh5mUIm55BggCdBdvq5tS zJQA== X-Gm-Message-State: AOAM532eCZXBR+0MVuIcAltmI/Onv7ObKxFrWyeu4k5CcTTCGcZI+0SW KlKTihYr2lq3+xmuAQfMXA== X-Google-Smtp-Source: ABdhPJz1GQKsmbNWfcveEq9z+WBLQtpdPuWRxooywpFwBudd2c3G4Q4K8R/mVbo0j4+jEyU8567M3g== X-Received: by 2002:a54:480a:: with SMTP id j10mr1945670oij.34.1639608847867; Wed, 15 Dec 2021 14:54:07 -0800 (PST) Received: from xps15.herring.priv (66-90-148-213.dyn.grandenetworks.net. [66.90.148.213]) by smtp.googlemail.com with ESMTPSA id bl33sm665930oib.47.2021.12.15.14.54.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Dec 2021 14:54:07 -0800 (PST) From: Rob Herring To: Alan Stern , Greg Kroah-Hartman , Krzysztof Kozlowski Cc: Lad Prabhakar , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: ohci-s3c2410: Use platform_get_irq() to get the interrupt Date: Wed, 15 Dec 2021 16:53:57 -0600 Message-Id: <20211215225358.1993774-1-robh@kernel.org> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211215_145409_432277_AC6C0976 X-CRM114-Status: GOOD ( 13.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Accessing platform device resources directly has long been deprecated for DT as IRQ resources may not be available at device creation time. Drivers relying on the static IRQ resources is blocking removing the static setup from the DT core code. Signed-off-by: Rob Herring Reviewed-by: Krzysztof Kozlowski Acked-by: Alan Stern --- drivers/usb/host/ohci-s3c2410.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index 1bec9b585e2d..12264c048601 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c @@ -356,7 +356,7 @@ static int ohci_hcd_s3c2410_probe(struct platform_device *dev) { struct usb_hcd *hcd = NULL; struct s3c2410_hcd_info *info = dev_get_platdata(&dev->dev); - int retval; + int retval, irq; s3c2410_usb_set_power(info, 1, 1); s3c2410_usb_set_power(info, 2, 1); @@ -388,9 +388,15 @@ static int ohci_hcd_s3c2410_probe(struct platform_device *dev) goto err_put; } + irq = platform_get_irq(dev, 0); + if (irq < 0) { + retval = irq; + goto err_put; + } + s3c2410_start_hc(dev, hcd); - retval = usb_add_hcd(hcd, dev->resource[1].start, 0); + retval = usb_add_hcd(hcd, irq, 0); if (retval != 0) goto err_ioremap;