gnss: serial: Use pm_runtime_resume_and_get()
PATCH 1/2 gnss: serial: Use pm_runtime_resume_and_get()
From: bui duc phuc <[email protected]>
Replace the open-coded pm_runtime_get_sync() + pm_runtime_put_noidle() error handling pattern with pm_runtime_resume_and_get(), which already does this internally.
No functional change.
Signed-off-by bui duc phuc <[email protected]>
--- drivers/gnss/serial.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/gnss/serial.c +2 -4
@@ -32,11 +32,9 @@ static int gnss_serial_open(struct gnss_device *gdev)serdev_device_set_baudrate (serdev, gserial->speed);serdev_device_set_flow_control (serdev, false); - ret =pm_runtime_get_sync (&serdev->dev); -if (ret <0 ) { -pm_runtime_put_noidle (&serdev->dev); + ret =pm_runtime_resume_and_get (&serdev->dev); +if (ret <0 ) goto err_close; - }return 0 ;
Signature · 1 line
2.43.0
PATCH 2/2 gnss: sirf: Use pm_runtime_resume_and_get()
From: bui duc phuc <[email protected]>
Replace the open-coded pm_runtime_get_sync() + pm_runtime_put_noidle() error handling pattern with pm_runtime_resume_and_get(), which already does this internally.
No functional change.
Signed-off-by bui duc phuc <[email protected]>
--- drivers/gnss/sirf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/gnss/sirf.c +1 -2
@@ -103,10 +103,9 @@ static int sirf_open(struct gnss_device *gdev)return ret; } - ret =pm_runtime_get_sync (&serdev->dev); + ret =pm_runtime_resume_and_get (&serdev->dev);if (ret <0 ) {dev_err (&gdev->dev,"failed to runtime resume: %d\n" , ret); -pm_runtime_put_noidle (&serdev->dev); goto err_close; }
Signature · 1 line
2.43.0