Skip to content

Commit d5301c9

Browse files
raagjadavandy-shev
authored andcommitted
pinctrl: cherryview: fix address_space_handler() argument
First argument of acpi_*_address_space_handler() APIs is acpi_handle of the device, which is incorrectly passed in driver ->remove() path here. Fix it by passing the appropriate argument and while at it, make both API calls consistent using ACPI_HANDLE(). Fixes: a0b0285 ("pinctrl: cherryview: Add support for GMMR GPIO opregion") Cc: stable@vger.kernel.org Signed-off-by: Raag Jadav <raag.jadav@intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
1 parent da41309 commit d5301c9

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/pinctrl/intel/pinctrl-cherryview.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1649,7 +1649,6 @@ static int chv_pinctrl_probe(struct platform_device *pdev)
16491649
struct intel_community_context *cctx;
16501650
struct intel_community *community;
16511651
struct device *dev = &pdev->dev;
1652-
struct acpi_device *adev = ACPI_COMPANION(dev);
16531652
struct intel_pinctrl *pctrl;
16541653
acpi_status status;
16551654
unsigned int i;
@@ -1717,7 +1716,7 @@ static int chv_pinctrl_probe(struct platform_device *pdev)
17171716
if (ret)
17181717
return ret;
17191718

1720-
status = acpi_install_address_space_handler(adev->handle,
1719+
status = acpi_install_address_space_handler(ACPI_HANDLE(dev),
17211720
community->acpi_space_id,
17221721
chv_pinctrl_mmio_access_handler,
17231722
NULL, pctrl);
@@ -1734,7 +1733,7 @@ static int chv_pinctrl_remove(struct platform_device *pdev)
17341733
struct intel_pinctrl *pctrl = platform_get_drvdata(pdev);
17351734
const struct intel_community *community = &pctrl->communities[0];
17361735

1737-
acpi_remove_address_space_handler(ACPI_COMPANION(&pdev->dev),
1736+
acpi_remove_address_space_handler(ACPI_HANDLE(&pdev->dev),
17381737
community->acpi_space_id,
17391738
chv_pinctrl_mmio_access_handler);
17401739

0 commit comments

Comments
 (0)