Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8571fda authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

serial: 8250_dw: Use a unified new dev variable in remove



The commit 2cb78eab ("serial: 8250_dw: Use a unified new dev variable in
probe") introduced a local dev variable in ->probe(). Do the same in ->remove()
in order to prepare for sequential patches.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Link: https://lore.kernel.org/r/20190806094322.64987-1-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4b967e63
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -667,8 +667,9 @@ static int dw8250_probe(struct platform_device *pdev)
static int dw8250_remove(struct platform_device *pdev)
{
	struct dw8250_data *data = platform_get_drvdata(pdev);
	struct device *dev = &pdev->dev;

	pm_runtime_get_sync(&pdev->dev);
	pm_runtime_get_sync(dev);

	serial8250_unregister_port(data->line);

@@ -680,8 +681,8 @@ static int dw8250_remove(struct platform_device *pdev)
	if (!IS_ERR(data->clk))
		clk_disable_unprepare(data->clk);

	pm_runtime_disable(&pdev->dev);
	pm_runtime_put_noidle(&pdev->dev);
	pm_runtime_disable(dev);
	pm_runtime_put_noidle(dev);

	return 0;
}