mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
	linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andy@kernel.org>, Lee Jones <lee@kernel.org>
Subject: [PATCH v1 3/4] mfd: intel_soc_pmic_bxtwc: Use temporary variable for struct device
Date: Wed, 16 Oct 2024 13:49:53 +0300	[thread overview]
Message-ID: <20241016105201.757024-4-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20241016105201.757024-1-andriy.shevchenko@linux.intel.com>

Use a temporary variable for the struct device pointers to avoid
dereferencing. This makes code a bit neater.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/mfd/intel_soc_pmic_bxtwc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/mfd/intel_soc_pmic_bxtwc.c b/drivers/mfd/intel_soc_pmic_bxtwc.c
index 1469e89b88ce..5e6cffb162a0 100644
--- a/drivers/mfd/intel_soc_pmic_bxtwc.c
+++ b/drivers/mfd/intel_soc_pmic_bxtwc.c
@@ -434,15 +434,15 @@ static int bxtwc_add_chained_irq_chip(struct intel_soc_pmic *pmic,
 				const struct regmap_irq_chip *chip,
 				struct regmap_irq_chip_data **data)
 {
+	struct device *dev = pmic->dev;
 	int irq;
 
 	irq = regmap_irq_get_virq(pdata, pirq);
 	if (irq < 0)
-		return dev_err_probe(pmic->dev, irq, "Failed to get parent vIRQ(%d) for chip %s\n",
+		return dev_err_probe(dev, irq, "Failed to get parent vIRQ(%d) for chip %s\n",
 				     pirq, chip->name);
 
-	return devm_regmap_add_irq_chip(pmic->dev, pmic->regmap, irq, irq_flags,
-					0, chip, data);
+	return devm_regmap_add_irq_chip(dev, pmic->regmap, irq, irq_flags, 0, chip, data);
 }
 
 static int bxtwc_add_chained_devices(struct intel_soc_pmic *pmic,
-- 
2.43.0.rc1.1336.g36b5255a03ac


  parent reply	other threads:[~2024-10-16 10:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-16 10:49 [PATCH v1 0/4] mfd: intel_soc_pmic_bxtwc: A few cleanups Andy Shevchenko
2024-10-16 10:49 ` [PATCH v1 1/4] mfd: intel_soc_pmic_bxtwc: Switch to use ATTRIBUTE_GROUPS() Andy Shevchenko
2024-10-16 10:49 ` [PATCH v1 2/4] mfd: intel_soc_pmic_bxtwc: Don't use "proxy" headers Andy Shevchenko
2024-10-16 10:49 ` Andy Shevchenko [this message]
2024-10-16 10:49 ` [PATCH v1 4/4] mfd: intel_soc_pmic_bxtwc: Deduplicate error messages Andy Shevchenko
2024-10-31 14:59 ` [PATCH v1 0/4] mfd: intel_soc_pmic_bxtwc: A few cleanups Lee Jones

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=20241016105201.757024-4-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=andy@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®