From nobody Thu Apr 2 22:57:38 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 03A33ECAAD8 for ; Tue, 20 Sep 2022 10:32:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231252AbiITKb7 (ORCPT ); Tue, 20 Sep 2022 06:31:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44708 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229966AbiITKbU (ORCPT ); Tue, 20 Sep 2022 06:31:20 -0400 Received: from mail-m11875.qiye.163.com (mail-m11875.qiye.163.com [115.236.118.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F205B62ABD for ; Tue, 20 Sep 2022 03:31:18 -0700 (PDT) Received: from localhost.localdomain (unknown [58.22.7.114]) by mail-m11875.qiye.163.com (Hmail) with ESMTPA id 71C22280B29; Tue, 20 Sep 2022 18:31:16 +0800 (CST) From: Jianqun Xu To: linus.walleij@linaro.org, heiko@sntech.de, brgl@bgdev.pl, andriy.shevchenko@linux.intel.com Cc: robert.moore@intel.com, robh@kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, lenb@kernel.org, rafael@kernel.org, Jianqun Xu Subject: [PATCH 09/20] gpio/rockchip: drop 'bank->name' from the driver Date: Tue, 20 Sep 2022 18:30:57 +0800 Message-Id: <20220920103108.23074-10-jay.xu@rock-chips.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920103108.23074-1-jay.xu@rock-chips.com> References: <20220920103108.23074-1-jay.xu@rock-chips.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFJSktLSjdXWS1ZQUlXWQ8JGhUIEh9ZQVlCGUpJVh4eSU4fS01IHx5MSVUTARMWGhIXJB QOD1lXWRgSC1lBWU5DVUlJVUxVSkpPWVdZFhoPEhUdFFlBWU9LSFVKSktISkxVSktLVUtZBg++ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6NzI6Ogw5GD0eFBxLPQk6Lx8s FBZPCzFVSlVKTU1ITU1CQ0xMSkNIVTMWGhIXVREaAlUDDjsJFBgQVhgTEgsIVRgUFkVZV1kSC1lB WU5DVUlJVUxVSkpPWVdZCAFZQUhKTEs3Bg++ X-HM-Tid: 0a835a73b7f12eb1kusn71c22280b29 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Not to use the 'bank->name' and create 'gc->lable' by the bank number. Signed-off-by: Jianqun Xu --- drivers/gpio/gpio-rockchip.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-rockchip.c b/drivers/gpio/gpio-rockchip.c index bb50335239ac..dafcc8be1687 100644 --- a/drivers/gpio/gpio-rockchip.c +++ b/drivers/gpio/gpio-rockchip.c @@ -327,7 +327,7 @@ static void rockchip_irq_demux(struct irq_desc *desc) struct rockchip_pin_bank *bank =3D irq_desc_get_handler_data(desc); u32 pend; =20 - dev_dbg(bank->dev, "got irq for bank %s\n", bank->name); + dev_dbg(bank->dev, "got irq\n"); =20 chained_irq_enter(chip, desc); =20 @@ -521,8 +521,7 @@ static int rockchip_interrupts_register(struct rockchip= _pin_bank *bank) bank->domain =3D irq_domain_add_linear(bank->of_node, 32, &irq_generic_chip_ops, NULL); if (!bank->domain) { - dev_warn(bank->dev, "could not init irq domain for bank %s\n", - bank->name); + dev_warn(bank->dev, "could not init irq domain\n"); return -EINVAL; } =20 @@ -531,8 +530,7 @@ static int rockchip_interrupts_register(struct rockchip= _pin_bank *bank) handle_level_irq, clr, 0, 0); if (ret) { - dev_err(bank->dev, "could not alloc generic chips for bank %s\n", - bank->name); + dev_err(bank->dev, "could not alloc generic chips\n"); irq_domain_remove(bank->domain); return -EINVAL; } @@ -586,8 +584,10 @@ static int rockchip_gpiolib_register(struct rockchip_p= in_bank *bank) gc =3D &bank->gpio_chip; gc->base =3D bank->pin_base; gc->ngpio =3D bank->nr_pins; - gc->label =3D bank->name; gc->parent =3D bank->dev; + gc->label =3D devm_kasprintf(bank->dev, GFP_KERNEL, "gpio%d", bank->bank_= num); + if (!gc->label) + return -ENOMEM; =20 ret =3D gpiochip_add_data(gc, bank); if (ret) { --=20 2.25.1