aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/8250_dw.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2019-08-06 12:43:14 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-04 12:43:52 +0200
commita8571fda4740c6fb6a22f9b03699b53d699a6118 (patch)
tree369c67f7bef511b808a6a71f5ef4f53492fe6dff /drivers/tty/serial/8250/8250_dw.c
parentserial: lantiq: Add SMP support (diff)
downloadlinux-dev-a8571fda4740c6fb6a22f9b03699b53d699a6118.tar.xz
linux-dev-a8571fda4740c6fb6a22f9b03699b53d699a6118.zip
serial: 8250_dw: Use a unified new dev variable in remove
The commit 2cb78eab2376 ("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: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Kefeng Wang <wangkefeng.wang@huawei.com> Link: https://lore.kernel.org/r/20190806094322.64987-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250_dw.c')
-rw-r--r--drivers/tty/serial/8250/8250_dw.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250/8250_dw.c b/drivers/tty/serial/8250/8250_dw.c
index 284e8d052fc3..7b559f969f61 100644
--- a/drivers/tty/serial/8250/8250_dw.c
+++ b/drivers/tty/serial/8250/8250_dw.c
@@ -667,8 +667,9 @@ err_clk:
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;
}