* [PATCH v1] pinctrl: cherryview: use ACPI_HANDLE() to pass handle
@ 2023-08-21 6:30 Raag Jadav
2023-08-21 8:37 ` Mika Westerberg
0 siblings, 1 reply; 2+ messages in thread
From: Raag Jadav @ 2023-08-21 6:30 UTC (permalink / raw)
To: linus.walleij, mika.westerberg, andriy.shevchenko
Cc: linux-gpio, linux-kernel, mallikarjunappa.sangannavar, pandith.n,
Raag Jadav
Use ACPI_HANDLE() to pass handle to acpi_*_address_space_handler() APIs.
Fixes: a0b028597d59 ("pinctrl: cherryview: Add support for GMMR GPIO opregion")
Signed-off-by: Raag Jadav <raag.jadav@intel.com>
---
drivers/pinctrl/intel/pinctrl-cherryview.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/pinctrl/intel/pinctrl-cherryview.c b/drivers/pinctrl/intel/pinctrl-cherryview.c
index 2c619fcf93ca..5a50bee48873 100644
--- a/drivers/pinctrl/intel/pinctrl-cherryview.c
+++ b/drivers/pinctrl/intel/pinctrl-cherryview.c
@@ -1650,7 +1650,6 @@ static int chv_pinctrl_probe(struct platform_device *pdev)
struct intel_community_context *cctx;
struct intel_community *community;
struct device *dev = &pdev->dev;
- struct acpi_device *adev = ACPI_COMPANION(dev);
struct intel_pinctrl *pctrl;
acpi_status status;
unsigned int i;
@@ -1718,7 +1717,7 @@ static int chv_pinctrl_probe(struct platform_device *pdev)
if (ret)
return ret;
- status = acpi_install_address_space_handler(adev->handle,
+ status = acpi_install_address_space_handler(ACPI_HANDLE(dev),
community->acpi_space_id,
chv_pinctrl_mmio_access_handler,
NULL, pctrl);
@@ -1735,7 +1734,7 @@ static int chv_pinctrl_remove(struct platform_device *pdev)
struct intel_pinctrl *pctrl = platform_get_drvdata(pdev);
const struct intel_community *community = &pctrl->communities[0];
- acpi_remove_address_space_handler(ACPI_COMPANION(&pdev->dev),
+ acpi_remove_address_space_handler(ACPI_HANDLE(&pdev->dev),
community->acpi_space_id,
chv_pinctrl_mmio_access_handler);
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1] pinctrl: cherryview: use ACPI_HANDLE() to pass handle
2023-08-21 6:30 [PATCH v1] pinctrl: cherryview: use ACPI_HANDLE() to pass handle Raag Jadav
@ 2023-08-21 8:37 ` Mika Westerberg
0 siblings, 0 replies; 2+ messages in thread
From: Mika Westerberg @ 2023-08-21 8:37 UTC (permalink / raw)
To: Raag Jadav
Cc: linus.walleij, andriy.shevchenko, linux-gpio, linux-kernel,
mallikarjunappa.sangannavar, pandith.n
On Mon, Aug 21, 2023 at 12:00:02PM +0530, Raag Jadav wrote:
> Use ACPI_HANDLE() to pass handle to acpi_*_address_space_handler() APIs.
Please explain here that this actually fixes a bug on the remove path
where we pass an incorrect pointer. Please adjust the $subject
accordingly.
> Fixes: a0b028597d59 ("pinctrl: cherryview: Add support for GMMR GPIO opregion")
Add also Cc: stable@vger.kernel.org
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-21 8:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-21 6:30 [PATCH v1] pinctrl: cherryview: use ACPI_HANDLE() to pass handle Raag Jadav
2023-08-21 8:37 ` Mika Westerberg
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.