From patchwork Tue Dec 13 13:52:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johan Hovold X-Patchwork-Id: 32823 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp137517wrn; Tue, 13 Dec 2022 06:05:13 -0800 (PST) X-Google-Smtp-Source: AA0mqf60GtL40lkWgM3JM2ZUgLVTyY93w/LsKGZ1oTnBk9FbdAs8okRJd4OtkQ/xxya9RYo+sFL4 X-Received: by 2002:a05:6a20:bca9:b0:ac:184:d297 with SMTP id fx41-20020a056a20bca900b000ac0184d297mr22216012pzb.38.1670940312934; Tue, 13 Dec 2022 06:05:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670940312; cv=none; d=google.com; s=arc-20160816; b=SLCEhZGljZMs/ZYhS0IdacCPVMsZO9w4u3Kj8vCUL6TTze77X+G8SF2XJQzj0mImYe 6Mh+vXSyDu2cfV7KJ2CSoelfJCIDFpN/wW4MJTVxCxr2zhNbeHXu6jjs9yWXIMnII6f2 bl45eyr8crbkSGd5ZN+Ef49BZsj8Pnv+rsAnjeuLJ529uelhZwA2JLTf+ayDJ2dSLROI wVGCn8CAM55/37vXrd5IRPZYRx33WZ2dDF/EY12FecrntcRlfKXdp5ZbH8aTnVhJLAwh 6AmqeZ/U7ZyU+AUnJ5EMrNRwjurzLZC6GiNaFE4/Pi9gDygCfvbK970nc1FMyT0YPWEA GDSg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=+vDTnBI42wHd1v+LyOht5jVCcGcrZe6IN4lQOx72WT4=; b=KYNAcMb79zu09JUPOgmLiKvVsCyB6JZO1E3E19sQbmjaHIqQM+ctYhGensEE/QW51J 7+4XwWnsr4sIGs8SqW+I4f12DVQfrTmf/3bCNEZfQW798Uf1GXDw8+MNfuP7bN9luI/m V+F0ULKxaWNAQOGrG9wqASW01RkaqPHszvuq+X3+8PAh+3AlvTGnCCfs4QZ0ACWJ9zIJ FJEBvcgpL0A/x1mNxNE1E0LPwoOD5eUBwFOZWbnYH9pTAtHR87DeRrx0mGKNH7fGp37l dEretkT2sgvAJqNSbSj2a7hoBmdbhStlvqwsCf9zClGz1o25D4FtPa1sP+yZtrQiEA8y CjuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mlB9wnWV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t66-20020a635f45000000b004787df29e4fsi12919825pgb.515.2022.12.13.06.04.57; Tue, 13 Dec 2022 06:05:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mlB9wnWV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235719AbiLMNwO (ORCPT + 99 others); Tue, 13 Dec 2022 08:52:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234639AbiLMNwN (ORCPT ); Tue, 13 Dec 2022 08:52:13 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCCF1E87; Tue, 13 Dec 2022 05:52:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5675861482; Tue, 13 Dec 2022 13:52:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95BD9C433D2; Tue, 13 Dec 2022 13:52:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670939531; bh=ozsOqii7yDA4mRglZq4iaweWnsQ4vb3m5tfjpKxpvJU=; h=From:To:Cc:Subject:Date:From; b=mlB9wnWVKHQQUsot8BirqD9Gl1ViMlEbbasljjhEbxqI+tEY7UDj6ekjhFuSDmwrb JoAJQtuS7J3HjFmDHCgkonCb+Rpb+KAW1vRqQGxmnV8QxOj0XJfCZl6BoXBnciRS4r i3+w78Dnr5wQ2MpB7fvW5BLhNCXf1rOkhOyQ4XvvfnBaRzIbGkE2+n28Bx3npA3gL1 AdOBLwonx+hBf9G4X3oejOGzjmnVGbtCHbxrPmIkqyzjWANyIzdCM+DMXZyf9sWCaa 3CIO7n+ef0TvH3UW5xBhYRjqD0xqSIIaPNBLWAsynoODPwORma/iHryTL1sEVTmSO6 GE8pbLQy66a0w== Received: from johan by xi.lan with local (Exim 4.94.2) (envelope-from ) id 1p55i1-0003ks-Kz; Tue, 13 Dec 2022 14:52:37 +0100 From: Johan Hovold To: Linus Walleij , Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org, Johan Hovold Subject: [PATCH] gpiolib: use irq_domain_alloc_irqs() Date: Tue, 13 Dec 2022 14:52:27 +0100 Message-Id: <20221213135227.14398-1-johan+linaro@kernel.org> X-Mailer: git-send-email 2.37.4 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752107909336845113?= X-GMAIL-MSGID: =?utf-8?q?1752107909336845113?= Use the irq_domain_alloc_irqs() wrapper instead of the full __irq_domain_alloc_irqs() interface, which was only intended for some legacy (x86) use cases. Signed-off-by: Johan Hovold Reviewed-by: Linus Walleij --- drivers/gpio/gpiolib.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 5a66d9616d7c..ede9630b197c 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -1126,14 +1126,8 @@ static void gpiochip_set_hierarchical_irqchip(struct gpio_chip *gc, /* Just pick something */ fwspec.param[1] = IRQ_TYPE_EDGE_RISING; fwspec.param_count = 2; - ret = __irq_domain_alloc_irqs(gc->irq.domain, - /* just pick something */ - -1, - 1, - NUMA_NO_NODE, - &fwspec, - false, - NULL); + ret = irq_domain_alloc_irqs(gc->irq.domain, 1, + NUMA_NO_NODE, &fwspec); if (ret < 0) { chip_err(gc, "can not allocate irq for GPIO line %d parent hwirq %d in hierarchy domain: %d\n",