* [PATCH v1] pinctrl: cherryview: Utilize temporary variable to hold device pointer
@ 2020-07-29 12:02 Andy Shevchenko
2020-08-03 12:34 ` Mika Westerberg
0 siblings, 1 reply; 3+ messages in thread
From: Andy Shevchenko @ 2020-07-29 12:02 UTC (permalink / raw)
To: Mika Westerberg, linux-gpio, Linus Walleij; +Cc: Andy Shevchenko
By one of the previous clean up change we got a temporary variable to hold
a device pointer. It can be utilized in other calls in the ->probe() and
save a bit of LOCs.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/pinctrl/intel/pinctrl-cherryview.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
index 595686e6a238..e48d4445e932 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -1621,7 +1621,7 @@ static int chv_pinctrl_probe(struct platform_device *pdev)
if (!pctrl)
return -ENOMEM;
- pctrl->dev = &pdev->dev;
+ pctrl->dev = dev;
pctrl->soc = soc_data;
pctrl->ncommunities = pctrl->soc->ncommunities;
@@ -1657,14 +1657,13 @@ static int chv_pinctrl_probe(struct platform_device *pdev)
return irq;
pctrl->pctldesc = chv_pinctrl_desc;
- pctrl->pctldesc.name = dev_name(&pdev->dev);
+ pctrl->pctldesc.name = dev_name(dev);
pctrl->pctldesc.pins = pctrl->soc->pins;
pctrl->pctldesc.npins = pctrl->soc->npins;
- pctrl->pctldev = devm_pinctrl_register(&pdev->dev, &pctrl->pctldesc,
- pctrl);
+ pctrl->pctldev = devm_pinctrl_register(dev, &pctrl->pctldesc, pctrl);
if (IS_ERR(pctrl->pctldev)) {
- dev_err(&pdev->dev, "failed to register pinctrl driver\n");
+ dev_err(dev, "failed to register pinctrl driver\n");
return PTR_ERR(pctrl->pctldev);
}
@@ -1677,7 +1676,7 @@ static int chv_pinctrl_probe(struct platform_device *pdev)
chv_pinctrl_mmio_access_handler,
NULL, pctrl);
if (ACPI_FAILURE(status))
- dev_err(&pdev->dev, "failed to install ACPI addr space handler\n");
+ dev_err(dev, "failed to install ACPI addr space handler\n");
platform_set_drvdata(pdev, pctrl);
--
2.27.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v1] pinctrl: cherryview: Utilize temporary variable to hold device pointer
2020-07-29 12:02 [PATCH v1] pinctrl: cherryview: Utilize temporary variable to hold device pointer Andy Shevchenko
@ 2020-08-03 12:34 ` Mika Westerberg
2020-08-18 12:10 ` Andy Shevchenko
0 siblings, 1 reply; 3+ messages in thread
From: Mika Westerberg @ 2020-08-03 12:34 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: linux-gpio, Linus Walleij
On Wed, Jul 29, 2020 at 03:02:30PM +0300, Andy Shevchenko wrote:
> By one of the previous clean up change we got a temporary variable to hold
> a device pointer. It can be utilized in other calls in the ->probe() and
> save a bit of LOCs.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] pinctrl: cherryview: Utilize temporary variable to hold device pointer
2020-08-03 12:34 ` Mika Westerberg
@ 2020-08-18 12:10 ` Andy Shevchenko
0 siblings, 0 replies; 3+ messages in thread
From: Andy Shevchenko @ 2020-08-18 12:10 UTC (permalink / raw)
To: Mika Westerberg; +Cc: linux-gpio, Linus Walleij
On Mon, Aug 03, 2020 at 03:34:40PM +0300, Mika Westerberg wrote:
> On Wed, Jul 29, 2020 at 03:02:30PM +0300, Andy Shevchenko wrote:
> > By one of the previous clean up change we got a temporary variable to hold
> > a device pointer. It can be utilized in other calls in the ->probe() and
> > save a bit of LOCs.
> >
> > Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
>
> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Applied to my review and testing queue, thanks!
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-08-18 12:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-29 12:02 [PATCH v1] pinctrl: cherryview: Utilize temporary variable to hold device pointer Andy Shevchenko
2020-08-03 12:34 ` Mika Westerberg
2020-08-18 12:10 ` Andy Shevchenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).