Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

iio: accel: Remove redundant pm_runtime_mark_last_busy() calls

pm_runtime_put_autosuspend(), pm_runtime_put_sync_autosuspend(),
pm_runtime_autosuspend() and pm_request_autosuspend() now include a call
to pm_runtime_mark_last_busy(). Remove the now-reduntant explicit call to
pm_runtime_mark_last_busy().

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/20250825135401.1765847-2-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Sakari Ailus and committed by
Jonathan Cameron
358db735 91812d38

+6 -30
+2 -5
drivers/iio/accel/bmc150-accel-core.c
··· 332 332 struct device *dev = regmap_get_device(data->regmap); 333 333 int ret; 334 334 335 - if (on) { 335 + if (on) 336 336 ret = pm_runtime_resume_and_get(dev); 337 - } else { 338 - pm_runtime_mark_last_busy(dev); 337 + else 339 338 ret = pm_runtime_put_autosuspend(dev); 340 - } 341 - 342 339 if (ret < 0) { 343 340 dev_err(dev, 344 341 "Failed: %s for %d\n", __func__, on);
-3
drivers/iio/accel/bmi088-accel-core.c
··· 375 375 return -EINVAL; 376 376 377 377 out_read_raw_pm_put: 378 - pm_runtime_mark_last_busy(dev); 379 378 pm_runtime_put_autosuspend(dev); 380 379 381 380 return ret; ··· 418 419 return ret; 419 420 420 421 ret = bmi088_accel_set_scale(data, val, val2); 421 - pm_runtime_mark_last_busy(dev); 422 422 pm_runtime_put_autosuspend(dev); 423 423 return ret; 424 424 case IIO_CHAN_INFO_SAMP_FREQ: ··· 426 428 return ret; 427 429 428 430 ret = bmi088_accel_set_sample_freq(data, val); 429 - pm_runtime_mark_last_busy(dev); 430 431 pm_runtime_put_autosuspend(dev); 431 432 return ret; 432 433 default:
-1
drivers/iio/accel/fxls8962af-core.c
··· 222 222 struct device *dev = regmap_get_device(data->regmap); 223 223 int ret; 224 224 225 - pm_runtime_mark_last_busy(dev); 226 225 ret = pm_runtime_put_autosuspend(dev); 227 226 if (ret) 228 227 dev_err(dev, "failed to power off\n");
+1 -3
drivers/iio/accel/kxcjk-1013.c
··· 636 636 637 637 if (on) 638 638 ret = pm_runtime_resume_and_get(&data->client->dev); 639 - else { 640 - pm_runtime_mark_last_busy(&data->client->dev); 639 + else 641 640 ret = pm_runtime_put_autosuspend(&data->client->dev); 642 - } 643 641 if (ret < 0) { 644 642 dev_err(&data->client->dev, 645 643 "Failed: %s for %d\n", __func__, on);
-3
drivers/iio/accel/kxsd9.c
··· 151 151 ret = kxsd9_write_scale(indio_dev, val2); 152 152 } 153 153 154 - pm_runtime_mark_last_busy(st->dev); 155 154 pm_runtime_put_autosuspend(st->dev); 156 155 157 156 return ret; ··· 198 199 } 199 200 200 201 error_ret: 201 - pm_runtime_mark_last_busy(st->dev); 202 202 pm_runtime_put_autosuspend(st->dev); 203 203 204 204 return ret; ··· 248 250 { 249 251 struct kxsd9_state *st = iio_priv(indio_dev); 250 252 251 - pm_runtime_mark_last_busy(st->dev); 252 253 pm_runtime_put_autosuspend(st->dev); 253 254 254 255 return 0;
+2 -5
drivers/iio/accel/mma8452.c
··· 224 224 #ifdef CONFIG_PM 225 225 int ret; 226 226 227 - if (on) { 227 + if (on) 228 228 ret = pm_runtime_resume_and_get(&client->dev); 229 - } else { 230 - pm_runtime_mark_last_busy(&client->dev); 229 + else 231 230 ret = pm_runtime_put_autosuspend(&client->dev); 232 - } 233 - 234 231 if (ret < 0) { 235 232 dev_err(&client->dev, 236 233 "failed to change power state to %d\n", on);
+1 -4
drivers/iio/accel/mma9551_core.c
··· 671 671 672 672 if (on) 673 673 ret = pm_runtime_resume_and_get(&client->dev); 674 - else { 675 - pm_runtime_mark_last_busy(&client->dev); 674 + else 676 675 ret = pm_runtime_put_autosuspend(&client->dev); 677 - } 678 - 679 676 if (ret < 0) { 680 677 dev_err(&client->dev, 681 678 "failed to change power state to %d\n", on);
-6
drivers/iio/accel/msa311.c
··· 607 607 err = msa311_get_axis(msa311, chan, &axis); 608 608 mutex_unlock(&msa311->lock); 609 609 610 - pm_runtime_mark_last_busy(dev); 611 610 pm_runtime_put_autosuspend(dev); 612 611 613 612 iio_device_release_direct(indio_dev); ··· 740 741 break; 741 742 } 742 743 743 - pm_runtime_mark_last_busy(dev); 744 744 pm_runtime_put_autosuspend(dev); 745 745 746 746 if (err) ··· 779 781 break; 780 782 } 781 783 782 - pm_runtime_mark_last_busy(dev); 783 784 pm_runtime_put_autosuspend(dev); 784 785 785 786 iio_device_release_direct(indio_dev); ··· 829 832 830 833 mutex_unlock(&msa311->lock); 831 834 832 - pm_runtime_mark_last_busy(dev); 833 835 pm_runtime_put_autosuspend(dev); 834 836 835 837 if (err) ··· 851 855 struct msa311_priv *msa311 = iio_priv(indio_dev); 852 856 struct device *dev = msa311->dev; 853 857 854 - pm_runtime_mark_last_busy(dev); 855 858 pm_runtime_put_autosuspend(dev); 856 859 857 860 return 0; ··· 1224 1229 if (err) 1225 1230 return err; 1226 1231 1227 - pm_runtime_mark_last_busy(dev); 1228 1232 pm_runtime_put_autosuspend(dev); 1229 1233 1230 1234 err = devm_iio_device_register(dev, indio_dev);