From: Sasha Levin <sashal@kernel.org>
To: stable@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.15.y 1/2] gpio: pca953x: Utilise temporary variable for struct gpio_chip
Date: Tue, 10 Nov 2026 21:22:44 -0500 [thread overview]
Message-ID: <20261111022227.675763-1-sashal@kernel.org> (raw)
In-Reply-To: <20261107060925-failed-5.15-a0fe26929350@kernel.org>
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[ Upstream commit 9da0a75ea7ced4731b1f2c6c67dc409e40efb95a ]
We have a temporary variable to keep pointer to struct gpio_chip.
Utilise it where it makes sense.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Stable-dep-of: a0fe26929350 ("gpio: pca953x: Handle direction register read errors in IRQ paths")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpio/gpio-pca953x.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpio/gpio-pca953x.c b/drivers/gpio/gpio-pca953x.c
index 95a09a8daa687..d6ee35492721d 100644
--- a/drivers/gpio/gpio-pca953x.c
+++ b/drivers/gpio/gpio-pca953x.c
@@ -601,9 +601,7 @@ static int pca953x_gpio_set_config(struct gpio_chip *gc, unsigned int offset,
static void pca953x_setup_gpio(struct pca953x_chip *chip, int gpios)
{
- struct gpio_chip *gc;
-
- gc = &chip->gpio_chip;
+ struct gpio_chip *gc = &chip->gpio_chip;
gc->direction_input = pca953x_gpio_direction_input;
gc->direction_output = pca953x_gpio_direction_output;
@@ -803,6 +801,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
struct irq_chip *irq_chip = &chip->irq_chip;
DECLARE_BITMAP(reg_direction, MAX_LINE);
DECLARE_BITMAP(irq_stat, MAX_LINE);
+ struct gpio_chip *gc = &chip->gpio_chip;
struct gpio_irq_chip *girq;
int ret;
@@ -831,7 +830,7 @@ static int pca953x_irq_setup(struct pca953x_chip *chip, int irq_base)
* this purpose.
*/
pca953x_read_regs(chip, chip->regs->direction, reg_direction);
- bitmap_and(chip->irq_stat, irq_stat, reg_direction, chip->gpio_chip.ngpio);
+ bitmap_and(chip->irq_stat, irq_stat, reg_direction, gc->ngpio);
mutex_init(&chip->irq_lock);
irq_chip->name = dev_name(&client->dev);
--
2.53.0
next prev parent reply other threads:[~2026-11-11 2:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-07 11:09 FAILED: patch "[PATCH] gpio: pca953x: Handle direction register read errors in IRQ paths" failed to apply to 5.15-stable tree Sasha Levin
2026-11-11 2:22 ` Sasha Levin [this message]
2026-11-11 2:22 ` [PATCH 5.15.y 2/2] gpio: pca953x: Handle direction register read errors in IRQ paths Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261111022227.675763-1-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.