Skip to content

Commit

Permalink
serial: 8250_dw: Use a unified new dev variable in remove
Browse files Browse the repository at this point in the history
The commit 2cb78ea ("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 <[email protected]>
Reviewed-by: Kefeng Wang <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
andy-shev authored and gregkh committed Sep 4, 2019
1 parent 4b967e6 commit a8571fd
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/tty/serial/8250/8250_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand All @@ -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;
}
Expand Down

0 comments on commit a8571fd

Please sign in to comment.