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

iio: imu: 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-8-sakari.ailus@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Sakari Ailus and committed by
Jonathan Cameron
00a3c4be 4c0a7ad7

+2 -23
-5
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c
··· 315 315 ret = -EINVAL; 316 316 exit: 317 317 mutex_unlock(&st->lock); 318 - pm_runtime_mark_last_busy(dev); 319 318 pm_runtime_put_autosuspend(dev); 320 319 return ret; 321 320 } ··· 566 567 ret = inv_icm42600_set_accel_conf(st, &conf, NULL); 567 568 568 569 mutex_unlock(&st->lock); 569 - pm_runtime_mark_last_busy(dev); 570 570 pm_runtime_put_autosuspend(dev); 571 571 572 572 return ret; ··· 673 675 674 676 out_unlock: 675 677 mutex_unlock(&st->lock); 676 - pm_runtime_mark_last_busy(dev); 677 678 pm_runtime_put_autosuspend(dev); 678 679 679 680 return ret; ··· 724 727 memcpy(data, st->buffer, sizeof(data)); 725 728 726 729 mutex_unlock(&st->lock); 727 - pm_runtime_mark_last_busy(dev); 728 730 pm_runtime_put_autosuspend(dev); 729 731 if (ret) 730 732 return ret; ··· 861 865 862 866 out_unlock: 863 867 mutex_unlock(&st->lock); 864 - pm_runtime_mark_last_busy(dev); 865 868 pm_runtime_put_autosuspend(dev); 866 869 return ret; 867 870 }
-1
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c
··· 430 430 if (sleep) 431 431 msleep(sleep); 432 432 433 - pm_runtime_mark_last_busy(dev); 434 433 pm_runtime_put_autosuspend(dev); 435 434 436 435 return ret;
-5
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c
··· 184 184 ret = -EINVAL; 185 185 exit: 186 186 mutex_unlock(&st->lock); 187 - pm_runtime_mark_last_busy(dev); 188 187 pm_runtime_put_autosuspend(dev); 189 188 return ret; 190 189 } ··· 282 283 ret = inv_icm42600_set_gyro_conf(st, &conf, NULL); 283 284 284 285 mutex_unlock(&st->lock); 285 - pm_runtime_mark_last_busy(dev); 286 286 pm_runtime_put_autosuspend(dev); 287 287 288 288 return ret; ··· 376 378 377 379 out_unlock: 378 380 mutex_unlock(&st->lock); 379 - pm_runtime_mark_last_busy(dev); 380 381 pm_runtime_put_autosuspend(dev); 381 382 382 383 return ret; ··· 427 430 memcpy(data, st->buffer, sizeof(data)); 428 431 429 432 mutex_unlock(&st->lock); 430 - pm_runtime_mark_last_busy(dev); 431 433 pm_runtime_put_autosuspend(dev); 432 434 if (ret) 433 435 return ret; ··· 563 567 564 568 out_unlock: 565 569 mutex_unlock(&st->lock); 566 - pm_runtime_mark_last_busy(dev); 567 570 pm_runtime_put_autosuspend(dev); 568 571 return ret; 569 572 }
-1
drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c
··· 37 37 38 38 exit: 39 39 mutex_unlock(&st->lock); 40 - pm_runtime_mark_last_busy(dev); 41 40 pm_runtime_put_autosuspend(dev); 42 41 43 42 return ret;
-6
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c
··· 735 735 break; 736 736 } 737 737 738 - pm_runtime_mark_last_busy(pdev); 739 738 pm_runtime_put_autosuspend(pdev); 740 739 741 740 return ret; ··· 937 938 break; 938 939 } 939 940 940 - pm_runtime_mark_last_busy(pdev); 941 941 pm_runtime_put_autosuspend(pdev); 942 942 error_write_raw_unlock: 943 943 mutex_unlock(&st->lock); ··· 1144 1146 st->chip_config.wom_en = false; 1145 1147 } 1146 1148 1147 - pm_runtime_mark_last_busy(pdev); 1148 1149 pm_runtime_put_autosuspend(pdev); 1149 1150 } 1150 1151 1151 1152 return result; 1152 1153 1153 1154 error_suspend: 1154 - pm_runtime_mark_last_busy(pdev); 1155 1155 pm_runtime_put_autosuspend(pdev); 1156 1156 return result; 1157 1157 } ··· 1245 1249 value = (u64)val * 1000000ULL + (u64)val2; 1246 1250 result = inv_mpu6050_set_wom_threshold(st, value, INV_MPU6050_FREQ_DIVIDER(st)); 1247 1251 1248 - pm_runtime_mark_last_busy(pdev); 1249 1252 pm_runtime_put_autosuspend(pdev); 1250 1253 1251 1254 return result; ··· 1352 1357 if (result) 1353 1358 goto fifo_rate_fail_power_off; 1354 1359 1355 - pm_runtime_mark_last_busy(pdev); 1356 1360 fifo_rate_fail_power_off: 1357 1361 pm_runtime_put_autosuspend(pdev); 1358 1362 fifo_rate_fail_unlock:
-1
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c
··· 194 194 result = inv_mpu6050_prepare_fifo(st, false); 195 195 if (result) 196 196 goto error_power_off; 197 - pm_runtime_mark_last_busy(pdev); 198 197 pm_runtime_put_autosuspend(pdev); 199 198 } 200 199
+2 -4
drivers/iio/imu/kmx61.c
··· 747 747 data->mag_ps = on; 748 748 } 749 749 750 - if (on) { 750 + if (on) 751 751 ret = pm_runtime_resume_and_get(&data->client->dev); 752 - } else { 753 - pm_runtime_mark_last_busy(&data->client->dev); 752 + else 754 753 ret = pm_runtime_put_autosuspend(&data->client->dev); 755 - } 756 754 if (ret < 0) { 757 755 dev_err(&data->client->dev, 758 756 "Failed: kmx61_set_power_state for %d, ret %d\n",