Use __func__ instead of hardcoding the function name in the
error message.
Signed-off-by: Hungyu Lin <dennylin0707@gmail.com>
---
drivers/iio/gyro/bmg160_core.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/iio/gyro/bmg160_core.c b/drivers/iio/gyro/bmg160_core.c
index 38394b5f3275..8cebac89ed81 100644
--- a/drivers/iio/gyro/bmg160_core.c
+++ b/drivers/iio/gyro/bmg160_core.c
@@ -313,8 +313,7 @@ static int bmg160_set_power_state(struct bmg160_data *data, bool on)
ret = pm_runtime_put_autosuspend(dev);
if (ret < 0) {
- dev_err(dev, "Failed: bmg160_set_power_state for %d\n", on);
-
+ dev_err(dev, "Failed: %s for %d\n", __func__, on);
if (on)
pm_runtime_put_noidle(dev);
--
2.34.1