From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D45742DBF75; Sat, 12 Sep 2026 12:04:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789214653; cv=none; b=Q+zFbWcHk59nlvYEKmH9BCwXiIL1uuPN4gpEi8MeQU7Ihm9vdX1Q9pI7fqJI0IjA2BljclTLXu123tcFfuAQ/o7I5pvvwyX7qJr4j7jEXuLBu0w9RpH3gs/hrappUjl5s/71duEzGPaAE9/0cNT92A52JHaG5RLV/sPcqCRTc0o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789214653; c=relaxed/simple; bh=u47ts6UrEgE/QYNVKoiM45CG/3SGXhmqoKGK8PQ2fjE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aWl370oqcQWEQ+3M/9+1f7szWkJXgUx/uN1PYP9EkQAvrMHUqChXLZcelPChm4htkSmrOkcS6Bl1KRHp0kh7nvITTPD1z6Zrn7NMOldB6kztrKVH8oE11rWlvQwLkVwVF8AlshAz93whkBj7rJ+TgK/Sq7/VEh3x4oNdB22oPOk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=dnHgjys+; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="dnHgjys+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5116D1F000FF; Sat, 12 Sep 2026 12:04:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1789214651; bh=lA0anVE1R0YPA6x2tqNM4TLK+5s2ycNW+hWoHwxeIho=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=dnHgjys+XJdQBuZ6ikwOvZiamLZaR0fwvG/klYm6xFXYldju7dj0Pmw70qTCVuJP7 FT2EoZpL5MldMB8BDDwcLSrqm9wKKLIrqxX9l96QhkWnYfIQvmipVrrNuKfDx5zOn2 NVt0SyRyi1T+wkehDM7dflry9GO12JKIJihtDiQs= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Michael Walle , Mark Brown , Sasha Levin Subject: [PATCH 6.12 0369/1376] regulator: tps6594-regulator: remove interrupt_count Date: Sat, 12 Sep 2026 08:46:35 +0200 Message-ID: <20260912065615.773806253@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260912065607.535295758@linuxfoundation.org> References: <20260912065607.535295758@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Michael Walle [ Upstream commit 16d1a9bf36ef649b1fdb866985b4b87584491fac ] In .probe() interrupt_count and nr_types is essentially the same. It contains the number of different interrupt per LDO or buck converter. Drop one. This is a preparation patch to further simplify the handling of different variants of this PMIC. This patch is only compile-time tested. Signed-off-by: Michael Walle Acked-by: Mark Brown Link: https://patch.msgid.link/20250703113153.2447110-6-mwalle@kernel.org Signed-off-by: Mark Brown Stable-dep-of: 7fd28093b3ef ("regulator: tps6594: Fix device node reference leaks in multiphase loop") Signed-off-by: Sasha Levin --- drivers/regulator/tps6594-regulator.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/drivers/regulator/tps6594-regulator.c b/drivers/regulator/tps6594-regulator.c index 0193efb5dffa9..1284a702db8f2 100644 --- a/drivers/regulator/tps6594-regulator.c +++ b/drivers/regulator/tps6594-regulator.c @@ -577,18 +577,15 @@ static int tps6594_regulator_probe(struct platform_device *pdev) const struct regulator_desc *multi_regs; const struct tps6594_regulator_irq_type **ldos_irq_types; const struct regulator_desc *ldo_regs; - size_t interrupt_count; if (tps->chip_id == TPS65224) { bucks_irq_types = tps65224_bucks_irq_types; - interrupt_count = ARRAY_SIZE(tps65224_buck1_irq_types); multi_regs = tps65224_multi_regs; ldos_irq_types = tps65224_ldos_irq_types; ldo_regs = tps65224_ldo_regs; multi_phase_cnt = ARRAY_SIZE(tps65224_multi_regs); } else { bucks_irq_types = tps6594_bucks_irq_types; - interrupt_count = ARRAY_SIZE(tps6594_buck1_irq_types); multi_regs = tps6594_multi_regs; ldos_irq_types = tps6594_ldos_irq_types; ldo_regs = tps6594_ldo_regs; @@ -686,29 +683,27 @@ static int tps6594_regulator_probe(struct platform_device *pdev) error = tps6594_request_reg_irqs(pdev, rdev, irq_data, bucks_irq_types[buck_idx], - interrupt_count, &irq_idx); + nr_types, &irq_idx); if (error) return error; error = tps6594_request_reg_irqs(pdev, rdev, irq_data, bucks_irq_types[buck_idx + 1], - interrupt_count, &irq_idx); + nr_types, &irq_idx); if (error) return error; if (i == MULTI_BUCK123 || i == MULTI_BUCK1234) { error = tps6594_request_reg_irqs(pdev, rdev, irq_data, tps6594_bucks_irq_types[buck_idx + 2], - interrupt_count, - &irq_idx); + nr_types, &irq_idx); if (error) return error; } if (i == MULTI_BUCK1234) { error = tps6594_request_reg_irqs(pdev, rdev, irq_data, tps6594_bucks_irq_types[buck_idx + 3], - interrupt_count, - &irq_idx); + nr_types, &irq_idx); if (error) return error; } @@ -727,7 +722,7 @@ static int tps6594_regulator_probe(struct platform_device *pdev) "failed to register %s regulator\n", pdev->name); error = tps6594_request_reg_irqs(pdev, rdev, irq_data, - bucks_irq_types[i], interrupt_count, &irq_idx); + bucks_irq_types[i], nr_types, &irq_idx); if (error) return error; } @@ -742,7 +737,7 @@ static int tps6594_regulator_probe(struct platform_device *pdev) pdev->name); error = tps6594_request_reg_irqs(pdev, rdev, irq_data, - ldos_irq_types[i], interrupt_count, + ldos_irq_types[i], nr_types, &irq_idx); if (error) return error; -- 2.53.0