Message ID | 20180509094419.13470-2-johan@kernel.org (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
diff --git a/drivers/gnss/sirf.c b/drivers/gnss/sirf.c index 497f8eb8467f..31b2cbccd194 100644 --- a/drivers/gnss/sirf.c +++ b/drivers/gnss/sirf.c @@ -57,6 +57,9 @@ static int sirf_open(struct gnss_device *gdev) goto err_close; } + /* Allow aggresive controller runtime PM. */ + pm_runtime_put(&serdev->ctrl->dev); + return 0; err_close: @@ -70,6 +73,9 @@ static void sirf_close(struct gnss_device *gdev) struct sirf_data *data = gnss_get_drvdata(gdev); struct serdev_device *serdev = data->serdev; + /* Balance the put in open() */ + pm_runtime_get(&serdev->ctrl->dev); + serdev_device_close(serdev); pm_runtime_put(&serdev->dev);