mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] iio: gyro: mpu3050-i2c: use pm_runtime_resume_and_get()
@ 2026-01-30 15:32 Antoniu Miclaus
  2026-01-30 15:32 ` [PATCH] iio: gyro: mpu3050-core: " Antoniu Miclaus
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Antoniu Miclaus @ 2026-01-30 15:32 UTC (permalink / raw)
  To: Linus Walleij, Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, linux-iio, linux-kernel
  Cc: Antoniu Miclaus

Use pm_runtime_resume_and_get() in bypass_select() and return its
result directly. Unlike pm_runtime_get_sync(), it doesn't increment
the refcount on failure.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
---
 drivers/iio/gyro/mpu3050-i2c.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/gyro/mpu3050-i2c.c b/drivers/iio/gyro/mpu3050-i2c.c
index 092878f2c886..6549b22e643d 100644
--- a/drivers/iio/gyro/mpu3050-i2c.c
+++ b/drivers/iio/gyro/mpu3050-i2c.c
@@ -19,8 +19,7 @@ static int mpu3050_i2c_bypass_select(struct i2c_mux_core *mux, u32 chan_id)
 	struct mpu3050 *mpu3050 = i2c_mux_priv(mux);
 
 	/* Just power up the device, that is all that is needed */
-	pm_runtime_get_sync(mpu3050->dev);
-	return 0;
+	return pm_runtime_resume_and_get(mpu3050->dev);
 }
 
 static int mpu3050_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id)
-- 
2.43.0


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-02-03 11:14 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-01-30 15:32 [PATCH] iio: gyro: mpu3050-i2c: use pm_runtime_resume_and_get() Antoniu Miclaus
2026-01-30 15:32 ` [PATCH] iio: gyro: mpu3050-core: " Antoniu Miclaus
2026-02-03  0:21   ` Linus Walleij
2026-01-31 16:41 ` [PATCH] iio: gyro: mpu3050-i2c: " Jonathan Cameron
2026-02-03  9:39   ` Nuno Sá
2026-02-03 11:13 ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®