Skip to contentSkip to conversation

treewide: Switch to __pm_runtime_put_autosuspend()

PATCH In review Sakari Ailus 22 participants 86 messages Oct 4, 2024 – Oct 24, 2024 Page 1 of 2

Subsystems (204)
lore
Share & tools
lore

Sakari Ailus

author maintainer
#0 lore raw

cover treewide: Switch to __pm_runtime_put_autosuspend()

Hello everyone,

This set will switch the users of pm_runtime_put_autosuspend() to __pm_runtime_put_autosuspend() while the former will soon be re-purposed to include a call to pm_runtime_mark_last_busy(). The two are almost always used together, apart from bugs which are likely common. Going forward, most new users should be using pm_runtime_put_autosuspend().

Once this conversion is done and pm_runtime_put_autosuspend() re-purposed, I'll post another set to merge the calls to __pm_runtime_put_autosuspend() and pm_runtime_mark_last_busy().

The diff in these patches have been generated using the following Coccinelle script (besides a manual change in drivers/iio/magnetometer/af8133j.c):

----------8<-------------------
@@
expression E1;

@@

- pm_runtime_put_autosuspend(E1)
+ __pm_runtime_put_autosuspend(E1)
----------8<-------------------

These patches are on top of today's linux-next (i.e. next-20241004).

Sakari Ailus (51):
accel/ivpu: Switch to __pm_runtime_put_autosuspend()
bluetooth: Switch to __pm_runtime_put_autosuspend()
bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()
hwrng: Switch to __pm_runtime_put_autosuspend()
clk: Switch to __pm_runtime_put_autosuspend()
crypto: Switch to __pm_runtime_put_autosuspend()
dmaengine: Switch to __pm_runtime_put_autosuspend()
gpio: Switch to __pm_runtime_put_autosuspend()
drm/amd: Switch to __pm_runtime_put_autosuspend() drm/nouveau: Switch to __pm_runtime_put_autosuspend() drm/radeon: Switch to __pm_runtime_put_autosuspend() drm/panfrost: Switch to __pm_runtime_put_autosuspend()
drivers: drm: Switch to __pm_runtime_put_autosuspend()
HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend() stm class: Switch to __pm_runtime_put_autosuspend()
i2c: Switch to __pm_runtime_put_autosuspend()
i3c: master: svc: Switch to __pm_runtime_put_autosuspend()
i3c: dw: Switch to __pm_runtime_put_autosuspend()
iio: Switch to __pm_runtime_put_autosuspend()
Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()
Input: cs40l50: Switch to __pm_runtime_put_autosuspend() iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend() irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()
mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()
media: Switch to __pm_runtime_put_autosuspend()
mfd: Switch to __pm_runtime_put_autosuspend()
mei: Switch to __pm_runtime_put_autosuspend()
mmc: Switch to __pm_runtime_put_autosuspend()
mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()
net: Switch to __pm_runtime_put_autosuspend()
nfc: trf7970a: Switch to __pm_runtime_put_autosuspend() PCI/portdrv: Switch to __pm_runtime_put_autosuspend()
phy: motorola: phy-mapphone-mdm6600: Switch to
__pm_runtime_put_autosuspend()
phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()
power: Switch to __pm_runtime_put_autosuspend()
pwm: img: Switch to __pm_runtime_put_autosuspend()
regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()
remoteproc: omap: Switch to __pm_runtime_put_autosuspend()
slimbus: Switch to __pm_runtime_put_autosuspend()
soundwire: Switch to __pm_runtime_put_autosuspend()
spi: Switch to __pm_runtime_put_autosuspend()
staging: Switch to __pm_runtime_put_autosuspend()
thunderbolt: Switch to __pm_runtime_put_autosuspend()
serial: Switch to __pm_runtime_put_autosuspend()
usb: Switch to __pm_runtime_put_autosuspend()
w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()
staging: greybus: Switch to __pm_runtime_put_autosuspend()
ALSA: hda: Switch to __pm_runtime_put_autosuspend()
ASoC: Switch to __pm_runtime_put_autosuspend()
ALSA: intel_hdmi: Switch to __pm_runtime_put_autosuspend()
soc: apple: mailbox: Switch to __pm_runtime_put_autosuspend()

 drivers/accel/ivpu/ivpu_drv.c                 |   2 +-
 drivers/accel/ivpu/ivpu_pm.c                  |   8 +-
 drivers/bluetooth/btmtksdio.c                 |   2 +-
 drivers/bluetooth/hci_bcm.c                   |   6 +-
 drivers/bluetooth/hci_h5.c                    |   4 +-
 drivers/bluetooth/hci_intel.c                 |   6 +-
 drivers/bus/sunxi-rsb.c                       |   4 +-
 drivers/char/hw_random/cctrng.c               |   2 +-
 drivers/char/hw_random/omap3-rom-rng.c        |   2 +-
 drivers/clk/imx/clk-imx8qxp-lpcg.c            |   2 +-
 drivers/clk/imx/clk-scu.c                     |   2 +-
 drivers/clk/qcom/lpassaudiocc-sc7280.c        |   4 +-
 drivers/clk/qcom/lpasscorecc-sc7180.c         |   4 +-
 drivers/crypto/ccree/cc_pm.c                  |   2 +-
 drivers/crypto/hisilicon/qm.c                 |   2 +-
 drivers/crypto/omap-aes-gcm.c                 |   2 +-
 drivers/crypto/omap-aes.c                     |   2 +-
 drivers/crypto/omap-des.c                     |   2 +-
 drivers/crypto/omap-sham.c                    |   2 +-
 drivers/crypto/rockchip/rk3288_crypto_ahash.c |   2 +-
 .../crypto/rockchip/rk3288_crypto_skcipher.c  |   2 +-
 drivers/crypto/stm32/stm32-crc32.c            |   4 +-
 drivers/crypto/stm32/stm32-cryp.c             |   2 +-
 drivers/crypto/stm32/stm32-hash.c             |   2 +-
 drivers/dma/at_xdmac.c                        |  24 +--
 drivers/dma/pl330.c                           |  14 +-
 drivers/dma/qcom/bam_dma.c                    |  10 +-
 drivers/dma/qcom/hidma.c                      |  18 +-
 drivers/dma/qcom/hidma_dbg.c                  |   2 +-
 drivers/dma/qcom/hidma_mgmt.c                 |   4 +-
 drivers/dma/ste_dma40.c                       |  16 +-
 drivers/dma/ti/cppi41.c                       |  10 +-
 drivers/dma/xilinx/zynqmp_dma.c               |   2 +-
 drivers/gpio/gpio-arizona.c                   |  10 +-
 drivers/gpio/gpio-mxc.c                       |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
 .../drm/bridge/analogix/analogix_dp_core.c    |   2 +-
 drivers/gpu/drm/bridge/analogix/anx7625.c     |   4 +-
 drivers/gpu/drm/bridge/parade-ps8640.c        |   4 +-
 drivers/gpu/drm/bridge/ti-sn65dsi86.c         |  14 +-
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c         |  12 +-
 drivers/gpu/drm/exynos/exynos_drm_fimc.c      |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_g2d.c       |   4 +-
 drivers/gpu/drm/exynos/exynos_drm_gsc.c       |   6 +-
 drivers/gpu/drm/exynos/exynos_drm_rotator.c   |   2 +-
 drivers/gpu/drm/exynos/exynos_drm_scaler.c    |   2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c       |   4 +-
 drivers/gpu/drm/imx/dcss/dcss-crtc.c          |   2 +-
 drivers/gpu/drm/lima/lima_sched.c             |   2 +-
 drivers/gpu/drm/msm/adreno/adreno_device.c    |   2 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c       |   2 +-
 drivers/gpu/drm/msm/msm_gpu.c                 |   2 +-
 drivers/gpu/drm/msm/msm_iommu.c               |   4 +-
 drivers/gpu/drm/msm/msm_submitqueue.c         |   2 +-
 drivers/gpu/drm/nouveau/dispnv50/disp.c       |  10 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c   |   4 +-
 drivers/gpu/drm/nouveau/nouveau_debugfs.c     |   8 +-
 drivers/gpu/drm/nouveau/nouveau_display.c     |   4 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c         |  10 +-
 drivers/gpu/drm/nouveau/nouveau_gem.c         |  10 +-
 drivers/gpu/drm/panel/panel-edp.c             |   8 +-
 .../gpu/drm/panel/panel-samsung-atna33xc20.c  |   6 +-
 drivers/gpu/drm/panel/panel-simple.c          |   6 +-
 drivers/gpu/drm/panfrost/panfrost_job.c       |   4 +-
 drivers/gpu/drm/panfrost/panfrost_mmu.c       |   4 +-
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c   |   4 +-
 drivers/gpu/drm/panthor/panthor_device.c      |   2 +-
 drivers/gpu/drm/panthor/panthor_sched.c       |   6 +-
 drivers/gpu/drm/radeon/radeon_acpi.c          |   2 +-
 drivers/gpu/drm/radeon/radeon_connectors.c    |  20 +-
 drivers/gpu/drm/radeon/radeon_display.c       |   6 +-
 drivers/gpu/drm/radeon/radeon_drv.c           |   4 +-
 drivers/gpu/drm/radeon/radeon_fbdev.c         |   4 +-
 drivers/gpu/drm/radeon/radeon_kms.c           |  10 +-
 drivers/gpu/drm/tegra/submit.c                |   2 +-
 drivers/gpu/drm/tidss/tidss_drv.c             |   2 +-
 drivers/gpu/drm/vc4/vc4_v3d.c                 |   2 +-
 drivers/hsi/controllers/omap_ssi_port.c       |  42 ++---
 drivers/hwtracing/stm/core.c                  |   8 +-
 drivers/i2c/busses/i2c-amd-mp2-pci.c          |   2 +-
 drivers/i2c/busses/i2c-amd-mp2.h              |   2 +-
 drivers/i2c/busses/i2c-at91-master.c          |   2 +-
 drivers/i2c/busses/i2c-cadence.c              |   2 +-
 drivers/i2c/busses/i2c-davinci.c              |   4 +-
 drivers/i2c/busses/i2c-designware-master.c    |   2 +-
 drivers/i2c/busses/i2c-designware-pcidrv.c    |   2 +-
 drivers/i2c/busses/i2c-hix5hd2.c              |   2 +-
 drivers/i2c/busses/i2c-i801.c                 |   4 +-
 drivers/i2c/busses/i2c-img-scb.c              |   6 +-
 drivers/i2c/busses/i2c-imx-lpi2c.c            |   6 +-
 drivers/i2c/busses/i2c-imx.c                  |   4 +-
 drivers/i2c/busses/i2c-mv64xxx.c              |   2 +-
 drivers/i2c/busses/i2c-nvidia-gpu.c           |   4 +-
 drivers/i2c/busses/i2c-omap.c                 |   6 +-
 drivers/i2c/busses/i2c-qcom-cci.c             |   2 +-
 drivers/i2c/busses/i2c-qcom-geni.c            |   2 +-
 drivers/i2c/busses/i2c-qup.c                  |   4 +-
 drivers/i2c/busses/i2c-riic.c                 |   4 +-
 drivers/i2c/busses/i2c-rzv2m.c                |   2 +-
 drivers/i2c/busses/i2c-sprd.c                 |   4 +-
 drivers/i2c/busses/i2c-stm32f7.c              |  10 +-
 drivers/i2c/busses/i2c-xiic.c                 |   2 +-
 drivers/i3c/master/dw-i3c-master.c            |  16 +-
 drivers/i3c/master/svc-i3c-master.c           |  16 +-
 drivers/iio/accel/bmc150-accel-core.c         |   2 +-
 drivers/iio/accel/bmi088-accel-core.c         |   6 +-
 drivers/iio/accel/fxls8962af-core.c           |   2 +-
 drivers/iio/accel/kxcjk-1013.c                |   2 +-
 drivers/iio/accel/kxsd9.c                     |   6 +-
 drivers/iio/accel/mma8452.c                   |   2 +-
 drivers/iio/accel/mma9551_core.c              |   2 +-
 drivers/iio/accel/msa311.c                    |  12 +-
 drivers/iio/adc/ab8500-gpadc.c                |   2 +-
 drivers/iio/adc/at91-sama5d2_adc.c            |  20 +-
 drivers/iio/adc/rcar-gyroadc.c                |   2 +-
 drivers/iio/adc/stm32-adc-core.c              |   2 +-
 drivers/iio/adc/stm32-adc.c                   |  12 +-
 drivers/iio/adc/sun4i-gpadc-iio.c             |   4 +-
 drivers/iio/adc/ti-ads1015.c                  |   2 +-
 drivers/iio/adc/ti-ads1100.c                  |   2 +-
 drivers/iio/adc/ti-ads1119.c                  |   4 +-
 drivers/iio/chemical/atlas-sensor.c           |   4 +-
 .../common/hid-sensors/hid-sensor-trigger.c   |   2 +-
 drivers/iio/dac/stm32-dac.c                   |   6 +-
 drivers/iio/gyro/bmg160_core.c                |   2 +-
 drivers/iio/gyro/fxas21002c_core.c            |   2 +-
 drivers/iio/gyro/mpu3050-core.c               |   6 +-
 drivers/iio/gyro/mpu3050-i2c.c                |   2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_accel.c |  10 +-
 .../imu/inv_icm42600/inv_icm42600_buffer.c    |   2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  |  10 +-
 .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |   2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    |  14 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |   4 +-
 drivers/iio/imu/kmx61.c                       |   2 +-
 drivers/iio/light/apds9306.c                  |   6 +-
 drivers/iio/light/apds9960.c                  |   4 +-
 drivers/iio/light/bh1780.c                    |   2 +-
 drivers/iio/light/gp2ap002.c                  |   4 +-
 drivers/iio/light/isl29028.c                  |   2 +-
 drivers/iio/light/ltrf216a.c                  |   2 +-
 drivers/iio/light/pa12203001.c                |   2 +-
 drivers/iio/light/rpr0521.c                   |   2 +-
 drivers/iio/light/tsl2583.c                   |   2 +-
 drivers/iio/light/tsl2591.c                   |   4 +-
 drivers/iio/light/us5182d.c                   |   2 +-
 drivers/iio/light/vcnl4000.c                  |   2 +-
 drivers/iio/light/vcnl4035.c                  |   2 +-
 drivers/iio/magnetometer/af8133j.c            |   4 +-
 drivers/iio/magnetometer/ak8974.c             |   4 +-
 drivers/iio/magnetometer/ak8975.c             |   2 +-
 drivers/iio/magnetometer/bmc150_magn.c        |   2 +-
 drivers/iio/magnetometer/tmag5273.c           |   4 +-
 drivers/iio/magnetometer/yamaha-yas530.c      |   4 +-
 drivers/iio/pressure/bmp280-core.c            |  10 +-
 drivers/iio/pressure/icp10100.c               |   2 +-
 drivers/iio/pressure/mpl115.c                 |   4 +-
 drivers/iio/pressure/zpa2326.c                |   4 +-
 .../iio/proximity/pulsedlight-lidar-lite-v2.c |   2 +-
 drivers/iio/proximity/srf04.c                 |   2 +-
 drivers/iio/temperature/mlx90614.c            |   4 +-
 drivers/iio/temperature/mlx90632.c            |   4 +-
 drivers/iio/temperature/mlx90635.c            |   4 +-
 drivers/input/keyboard/omap4-keypad.c         |   8 +-
 drivers/input/misc/cs40l50-vibra.c            |   8 +-
 drivers/iommu/arm/arm-smmu/arm-smmu.c         |   2 +-
 drivers/irqchip/irq-imx-irqsteer.c            |   2 +-
 drivers/mailbox/mtk-cmdq-mailbox.c            |  10 +-
 drivers/media/i2c/alvium-csi2.c               |   2 +-
 drivers/media/i2c/ccs/ccs-core.c              |  10 +-
 drivers/media/i2c/dw9719.c                    |   2 +-
 drivers/media/i2c/gc0308.c                    |   6 +-
 drivers/media/i2c/gc2145.c                    |   8 +-
 drivers/media/i2c/imx283.c                    |   6 +-
 drivers/media/i2c/imx290.c                    |   6 +-
 drivers/media/i2c/imx296.c                    |   4 +-
 drivers/media/i2c/imx415.c                    |   4 +-
 drivers/media/i2c/mt9m114.c                   |  12 +-
 drivers/media/i2c/ov2680.c                    |   2 +-
 drivers/media/i2c/ov4689.c                    |   6 +-
 drivers/media/i2c/ov5640.c                    |   8 +-
 drivers/media/i2c/ov5645.c                    |   6 +-
 drivers/media/i2c/ov5693.c                    |   2 +-
 drivers/media/i2c/ov64a40.c                   |   8 +-
 drivers/media/i2c/ov7251.c                    |   2 +-
 drivers/media/i2c/ov8858.c                    |   4 +-
 drivers/media/i2c/thp7312.c                   |   8 +-
 drivers/media/i2c/video-i2c.c                 |   8 +-
 .../media/platform/nvidia/tegra-vde/h264.c    |   4 +-
 drivers/media/platform/qcom/venus/vdec.c      |   4 +-
 drivers/media/platform/qcom/venus/venc.c      |   4 +-
 .../platform/raspberrypi/pisp_be/pisp_be.c    |   4 +-
 .../media/platform/st/sti/delta/delta-v4l2.c  |   4 +-
 drivers/media/platform/st/sti/hva/hva-hw.c    |   8 +-
 .../media/platform/verisilicon/hantro_drv.c   |   2 +-
 drivers/media/rc/gpio-ir-recv.c               |   2 +-
 drivers/mfd/arizona-irq.c                     |   2 +-
 drivers/mfd/cs40l50-core.c                    |   2 +-
 drivers/mfd/cs42l43.c                         |   2 +-
 drivers/misc/mei/client.c                     |  14 +-
 drivers/mmc/core/core.c                       |   4 +-
 drivers/mmc/host/atmel-mci.c                  |   4 +-
 drivers/mmc/host/dw_mmc-rockchip.c            |   2 +-
 drivers/mmc/host/dw_mmc.c                     |   2 +-
 drivers/mmc/host/mmci.c                       |   2 +-
 drivers/mmc/host/omap_hsmmc.c                 |   6 +-
 drivers/mmc/host/sdhci-msm.c                  |   2 +-
 drivers/mmc/host/sdhci-of-at91.c              |   2 +-
 drivers/mmc/host/sdhci-omap.c                 |   4 +-
 drivers/mmc/host/sdhci-pci-core.c             |   2 +-
 drivers/mmc/host/sdhci-pxav3.c                |   6 +-
 drivers/mmc/host/sdhci-sprd.c                 |   2 +-
 drivers/mmc/host/sdhci-xenon.c                |   2 +-
 drivers/mmc/host/sdhci_am654.c                |   2 +-
 drivers/mmc/host/tmio_mmc_core.c              |   2 +-
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c    |  10 +-
 drivers/net/ethernet/cadence/macb_main.c      |  10 +-
 drivers/net/ethernet/freescale/fec_main.c     |  16 +-
 drivers/net/ethernet/renesas/ravb_main.c      |   8 +-
 drivers/net/ethernet/ti/davinci_mdio.c        |  14 +-
 drivers/net/ipa/ipa_interrupt.c               |   2 +-
 drivers/net/ipa/ipa_main.c                    |   2 +-
 drivers/net/ipa/ipa_modem.c                   |   8 +-
 drivers/net/ipa/ipa_smp2p.c                   |   4 +-
 drivers/net/ipa/ipa_uc.c                      |   4 +-
 drivers/net/wireless/ath/wil6210/pm.c         |   2 +-
 drivers/net/wireless/ti/wl18xx/debugfs.c      |   6 +-
 drivers/net/wireless/ti/wlcore/cmd.c          |   2 +-
 drivers/net/wireless/ti/wlcore/debugfs.c      |  22 +--
 drivers/net/wireless/ti/wlcore/main.c         |  72 +++----
 drivers/net/wireless/ti/wlcore/scan.c         |   2 +-
 drivers/net/wireless/ti/wlcore/sysfs.c        |   2 +-
 drivers/net/wireless/ti/wlcore/testmode.c     |   4 +-
 drivers/net/wireless/ti/wlcore/tx.c           |   2 +-
 drivers/net/wireless/ti/wlcore/vendor_cmd.c   |   6 +-
 drivers/net/wwan/qcom_bam_dmux.c              |   4 +-
 drivers/net/wwan/t7xx/t7xx_hif_cldma.c        |   6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c    |   6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c    |   4 +-
 drivers/nfc/trf7970a.c                        |   2 +-
 drivers/pci/pcie/portdrv.c                    |   2 +-
 drivers/phy/motorola/phy-mapphone-mdm6600.c   |   4 +-
 drivers/phy/ti/phy-twl4030-usb.c              |   8 +-
 drivers/power/supply/bq24190_charger.c        |  28 +--
 drivers/power/supply/twl4030_charger.c        |   2 +-
 drivers/pwm/pwm-img.c                         |   4 +-
 drivers/regulator/stm32-vrefbuf.c             |  12 +-
 drivers/remoteproc/omap_remoteproc.c          |   6 +-
 drivers/slimbus/core.c                        |   2 +-
 drivers/slimbus/messaging.c                   |   4 +-
 drivers/soc/apple/mailbox.c                   |   2 +-
 drivers/soundwire/bus.c                       |   2 +-
 drivers/soundwire/cadence_master.c            |   2 +-
 drivers/soundwire/qcom.c                      |   6 +-
 drivers/spi/atmel-quadspi.c                   |  10 +-
 drivers/spi/spi-cadence-quadspi.c             |   4 +-
 drivers/spi/spi-cadence.c                     |   2 +-
 drivers/spi/spi-dw-pci.c                      |   2 +-
 drivers/spi/spi-fsl-espi.c                    |   4 +-
 drivers/spi/spi-fsl-lpspi.c                   |   4 +-
 drivers/spi/spi-imx.c                         |   6 +-
 drivers/spi/spi-mtk-nor.c                     |   2 +-
 drivers/spi/spi-omap2-mcspi.c                 |   6 +-
 drivers/spi/spi-pxa2xx-pci.c                  |   2 +-
 drivers/spi/spi-s3c64xx.c                     |   6 +-
 drivers/spi/spi-sprd.c                        |   2 +-
 drivers/spi/spi-stm32-qspi.c                  |  14 +-
 drivers/spi/spi-stm32.c                       |   4 +-
 drivers/spi/spi-ti-qspi.c                     |   4 +-
 drivers/spi/spi-zynqmp-gqspi.c                |   2 +-
 drivers/spi/spi.c                             |   6 +-
 drivers/staging/greybus/gbphy.h               |   2 +-
 drivers/staging/media/rkvdec/rkvdec.c         |   2 +-
 drivers/thunderbolt/debugfs.c                 |  22 +--
 drivers/thunderbolt/domain.c                  |   4 +-
 drivers/thunderbolt/icm.c                     |  14 +-
 drivers/thunderbolt/nhi.c                     |   2 +-
 drivers/thunderbolt/retimer.c                 |   4 +-
 drivers/thunderbolt/switch.c                  |   6 +-
 drivers/thunderbolt/tb.c                      |  18 +-
 drivers/thunderbolt/usb4_port.c               |   4 +-
 drivers/tty/serial/8250/8250_omap.c           |  18 +-
 drivers/tty/serial/8250/8250_port.c           |   4 +-
 drivers/tty/serial/fsl_lpuart.c               |   2 +-
 drivers/tty/serial/serial_core.c              |   2 +-
 drivers/tty/serial/uartlite.c                 |   4 +-
 drivers/tty/serial/xilinx_uartps.c            |   2 +-
 drivers/usb/cdns3/cdns3-gadget.c              |   2 +-
 drivers/usb/cdns3/cdnsp-gadget.c              |   2 +-
 drivers/usb/chipidea/core.c                   |   2 +-
 drivers/usb/chipidea/otg_fsm.c                |   2 +-
 drivers/usb/dwc3/core.c                       |   2 +-
 drivers/usb/dwc3/dwc3-am62.c                  |   2 +-
 drivers/usb/dwc3/dwc3-imx8mp.c                |   2 +-
 drivers/usb/gadget/udc/cdns2/cdns2-gadget.c   |   2 +-
 drivers/usb/host/xhci-mtk.c                   |   2 +-
 drivers/usb/misc/apple-mfi-fastcharge.c       |   2 +-
 drivers/usb/mtu3/mtu3_plat.c                  |   2 +-
 drivers/usb/musb/musb_core.c                  |  10 +-
 drivers/usb/musb/musb_debugfs.c               |  10 +-
 drivers/usb/musb/musb_dsps.c                  |   2 +-
 drivers/usb/musb/musb_gadget.c                |   8 +-
 drivers/usb/musb/omap2430.c                   |   2 +-
 drivers/w1/masters/omap_hdq.c                 |  10 +-
 include/linux/greybus/bundle.h                |   2 +-
 sound/hda/hdac_device.c                       |   2 +-
 sound/pci/hda/cs35l41_hda.c                   |   8 +-
 sound/pci/hda/cs35l56_hda.c                   |   2 +-
 sound/pci/hda/hda_intel.c                     |   2 +-
 sound/pci/hda/tas2781_hda_i2c.c               |   6 +-
 sound/soc/atmel/mchp-spdifrx.c                |  12 +-
 sound/soc/codecs/arizona-jack.c               |  12 +-
 sound/soc/codecs/arizona.c                    |   2 +-
 sound/soc/codecs/cs35l41.c                    |   4 +-
 sound/soc/codecs/cs35l45.c                    |   2 +-
 sound/soc/codecs/cs35l56-sdw.c                |   4 +-
 sound/soc/codecs/cs35l56-shared.c             |   2 +-
 sound/soc/codecs/cs35l56.c                    |   2 +-
 sound/soc/codecs/cs42l42-sdw.c                |   2 +-
 sound/soc/codecs/cs42l42.c                    |   4 +-
 sound/soc/codecs/cs42l43-jack.c               |  10 +-
 sound/soc/codecs/cs42l43.c                    |   4 +-
 sound/soc/codecs/hda.c                        |   6 +-
 sound/soc/codecs/madera.c                     |   6 +-
 sound/soc/codecs/max98363.c                   |   2 +-
 sound/soc/codecs/max98373-sdw.c               |   2 +-
 sound/soc/codecs/rt1017-sdca-sdw.c            |   2 +-
 sound/soc/codecs/rt1308-sdw.c                 |   2 +-
 sound/soc/codecs/rt1316-sdw.c                 |   2 +-
 sound/soc/codecs/rt1318-sdw.c                 |   2 +-
 sound/soc/codecs/rt1320-sdw.c                 |   2 +-
 sound/soc/codecs/rt5682-sdw.c                 |   2 +-
 sound/soc/codecs/rt700.c                      |   4 +-
 sound/soc/codecs/rt711-sdca.c                 |   4 +-
 sound/soc/codecs/rt711.c                      |   4 +-
 sound/soc/codecs/rt712-sdca-dmic.c            |   2 +-
 sound/soc/codecs/rt712-sdca.c                 |   4 +-
 sound/soc/codecs/rt715-sdca.c                 |   2 +-
 sound/soc/codecs/rt715.c                      |   2 +-
 sound/soc/codecs/rt722-sdca.c                 |   4 +-
 sound/soc/codecs/wcd-mbhc-v2.c                |   4 +-
 sound/soc/codecs/wsa881x.c                    |   2 +-
 sound/soc/codecs/wsa884x.c                    |   2 +-
 sound/soc/intel/atom/sst/sst_pvt.c            |   2 +-
 sound/soc/intel/avs/core.c                    |   2 +-
 sound/soc/intel/avs/debugfs.c                 |   4 +-
 sound/soc/intel/avs/pcm.c                     |   2 +-
 sound/soc/intel/catpt/pcm.c                   |  12 +-
 sound/soc/intel/catpt/sysfs.c                 |   2 +-
 sound/soc/soc-component.c                     |   2 +-
 sound/soc/sof/control.c                       |   2 +-
 sound/soc/sof/debug.c                         |   2 +-
 sound/soc/sof/ipc3-dtrace.c                   |   2 +-
 sound/soc/sof/ipc4-loader.c                   |   2 +-
 sound/soc/sof/pcm.c                           |   2 +-
 sound/soc/sof/sof-client-ipc-flood-test.c     |   2 +-
 .../soc/sof/sof-client-ipc-kernel-injector.c  |   2 +-
 sound/soc/sof/sof-client-ipc-msg-injector.c   |   2 +-
 sound/soc/sof/sof-client-probes.c             |   6 +-
 sound/x86/intel_hdmi_audio.c                  |   6 +-
 373 files changed, 1076 insertions(+), 1076 deletions(-)
Signature · 1 line
2.39.5
author maintainer
#1 lore raw

PATCH 1/51 accel/ivpu: Switch to __pm_runtime_put_autosuspend()

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/accel/ivpu/ivpu_drv.c | 2 +-
 drivers/accel/ivpu/ivpu_pm.c  | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/accel/ivpu/ivpu_drv.c +1 -1
index c91400ecf926..4140ff55a4e6 100644
@@ -104,7 +104,7 @@ static void file_priv_release(struct kref *ref)
 	mutex_lock(&vdev->context_list_lock);
 	file_priv_unbind(vdev, file_priv);
 	mutex_unlock(&vdev->context_list_lock);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 
 	mutex_destroy(&file_priv->ms_lock);
 	mutex_destroy(&file_priv->lock);
drivers/accel/ivpu/ivpu_pm.c +4 -4
index 59d3170f5e35..643854e51fa0 100644
@@ -143,7 +143,7 @@ static void ivpu_pm_recovery_work(struct work_struct *work)
 
 	kobject_uevent_env(&vdev->drm.dev->kobj, KOBJ_CHANGE, evt);
 	pm_runtime_mark_last_busy(vdev->drm.dev);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 }
 
 void ivpu_pm_trigger_recovery(struct ivpu_device *vdev, const char *reason)
@@ -303,7 +303,7 @@ int ivpu_rpm_get(struct ivpu_device *vdev)
 void ivpu_rpm_put(struct ivpu_device *vdev)
 {
 	pm_runtime_mark_last_busy(vdev->drm.dev);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 }
 
 void ivpu_pm_reset_prepare_cb(struct pci_dev *pdev)
@@ -339,7 +339,7 @@ void ivpu_pm_reset_done_cb(struct pci_dev *pdev)
 	ivpu_dbg(vdev, PM, "Post-reset done.\n");
 
 	pm_runtime_mark_last_busy(vdev->drm.dev);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 }
 
 void ivpu_pm_init(struct ivpu_device *vdev)
@@ -381,7 +381,7 @@ void ivpu_pm_enable(struct ivpu_device *vdev)
 	pm_runtime_set_active(dev);
 	pm_runtime_allow(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 void ivpu_pm_disable(struct ivpu_device *vdev)
Signature · 1 line
2.39.5
Reviewed-by on v1 1/51
#2 lore raw

Re: [PATCH 01/51] accel/ivpu: Switch to __pm_runtime_put_autosuspend()

Quoted 64 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/accel/ivpu/ivpu_drv.c | 2 +-
 drivers/accel/ivpu/ivpu_pm.c  | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/accel/ivpu/ivpu_drv.c +1 -1
index c91400ecf926..4140ff55a4e6 100644
@@ -104,7 +104,7 @@ static void file_priv_release(struct kref *ref)
 	mutex_lock(&vdev->context_list_lock);
 	file_priv_unbind(vdev, file_priv);
 	mutex_unlock(&vdev->context_list_lock);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 
 	mutex_destroy(&file_priv->ms_lock);
 	mutex_destroy(&file_priv->lock);
drivers/accel/ivpu/ivpu_pm.c +4 -4
index 59d3170f5e35..643854e51fa0 100644
@@ -143,7 +143,7 @@ static void ivpu_pm_recovery_work(struct work_struct *work)
 
 	kobject_uevent_env(&vdev->drm.dev->kobj, KOBJ_CHANGE, evt);
 	pm_runtime_mark_last_busy(vdev->drm.dev);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 }
 
 void ivpu_pm_trigger_recovery(struct ivpu_device *vdev, const char *reason)
@@ -303,7 +303,7 @@ int ivpu_rpm_get(struct ivpu_device *vdev)
 void ivpu_rpm_put(struct ivpu_device *vdev)
 {
 	pm_runtime_mark_last_busy(vdev->drm.dev);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 }
 
 void ivpu_pm_reset_prepare_cb(struct pci_dev *pdev)
@@ -339,7 +339,7 @@ void ivpu_pm_reset_done_cb(struct pci_dev *pdev)
 	ivpu_dbg(vdev, PM, "Post-reset done.\n");
 
 	pm_runtime_mark_last_busy(vdev->drm.dev);
-	pm_runtime_put_autosuspend(vdev->drm.dev);
+	__pm_runtime_put_autosuspend(vdev->drm.dev);
 }
 
 void ivpu_pm_init(struct ivpu_device *vdev)
@@ -381,7 +381,7 @@ void ivpu_pm_enable(struct ivpu_device *vdev)
 	pm_runtime_set_active(dev);
 	pm_runtime_allow(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 void ivpu_pm_disable(struct ivpu_device *vdev)
author maintainer
#3 lore raw

PATCH 2/51 bluetooth: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/bluetooth/btmtksdio.c | 2 +-
 drivers/bluetooth/hci_bcm.c   | 6 +++---
 drivers/bluetooth/hci_h5.c    | 4 ++--
 drivers/bluetooth/hci_intel.c | 6 +++---
 4 files changed, 9 insertions(+), 9 deletions(-)
drivers/bluetooth/btmtksdio.c +1 -1
index cc097aedc1e1..a3bab78a5b1b 100644
@@ -615,7 +615,7 @@ static void btmtksdio_txrx_work(struct work_struct *work)
 	sdio_release_host(bdev->func);
 
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 }
 
 static void btmtksdio_interrupt(struct sdio_func *func)
drivers/bluetooth/hci_bcm.c +3 -3
index 89d4c2224546..5e3760c475b4 100644
@@ -327,7 +327,7 @@ static irqreturn_t bcm_host_wake(int irq, void *data)
 
 	pm_runtime_get(bdev->dev);
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 
 	return IRQ_HANDLED;
 }
@@ -711,7 +711,7 @@ static int bcm_recv(struct hci_uart *hu, const void *data, int count)
 		if (bcm->dev && bcm_device_exists(bcm->dev)) {
 			pm_runtime_get(bcm->dev->dev);
 			pm_runtime_mark_last_busy(bcm->dev->dev);
-			pm_runtime_put_autosuspend(bcm->dev->dev);
+			__pm_runtime_put_autosuspend(bcm->dev->dev);
 		}
 		mutex_unlock(&bcm_device_lock);
 	}
@@ -750,7 +750,7 @@ static struct sk_buff *bcm_dequeue(struct hci_uart *hu)
 
 	if (bdev) {
 		pm_runtime_mark_last_busy(bdev->dev);
-		pm_runtime_put_autosuspend(bdev->dev);
+		__pm_runtime_put_autosuspend(bdev->dev);
 	}
 
 	mutex_unlock(&bcm_device_lock);
drivers/bluetooth/hci_h5.c +2 -2
index c0436881a533..4b1c978c57e7 100644
@@ -593,7 +593,7 @@ static int h5_recv(struct hci_uart *hu, const void *data, int count)
 	if (hu->serdev) {
 		pm_runtime_get(&hu->serdev->dev);
 		pm_runtime_mark_last_busy(&hu->serdev->dev);
-		pm_runtime_put_autosuspend(&hu->serdev->dev);
+		__pm_runtime_put_autosuspend(&hu->serdev->dev);
 	}
 
 	return 0;
@@ -635,7 +635,7 @@ static int h5_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 	if (hu->serdev) {
 		pm_runtime_get_sync(&hu->serdev->dev);
 		pm_runtime_mark_last_busy(&hu->serdev->dev);
-		pm_runtime_put_autosuspend(&hu->serdev->dev);
+		__pm_runtime_put_autosuspend(&hu->serdev->dev);
 	}
 
 	return 0;
drivers/bluetooth/hci_intel.c +3 -3
index 999ccd5bb4f2..373813717130 100644
@@ -281,7 +281,7 @@ static irqreturn_t intel_irq(int irq, void *dev_id)
 	/* Host/Controller are now LPM resumed, trigger a new delayed suspend */
 	pm_runtime_get(&idev->pdev->dev);
 	pm_runtime_mark_last_busy(&idev->pdev->dev);
-	pm_runtime_put_autosuspend(&idev->pdev->dev);
+	__pm_runtime_put_autosuspend(&idev->pdev->dev);
 
 	return IRQ_HANDLED;
 }
@@ -372,7 +372,7 @@ static void intel_busy_work(struct work_struct *work)
 		if (intel->hu->tty->dev->parent == idev->pdev->dev.parent) {
 			pm_runtime_get(&idev->pdev->dev);
 			pm_runtime_mark_last_busy(&idev->pdev->dev);
-			pm_runtime_put_autosuspend(&idev->pdev->dev);
+			__pm_runtime_put_autosuspend(&idev->pdev->dev);
 			break;
 		}
 	}
@@ -1004,7 +1004,7 @@ static int intel_enqueue(struct hci_uart *hu, struct sk_buff *skb)
 		if (hu->tty->dev->parent == idev->pdev->dev.parent) {
 			pm_runtime_get_sync(&idev->pdev->dev);
 			pm_runtime_mark_last_busy(&idev->pdev->dev);
-			pm_runtime_put_autosuspend(&idev->pdev->dev);
+			__pm_runtime_put_autosuspend(&idev->pdev->dev);
 			break;
 		}
 	}
Signature · 1 line
2.39.5
author maintainer
#4 lore raw

PATCH 3/51 bus: sunxi-rsb: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/bus/sunxi-rsb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bus/sunxi-rsb.c +2 -2
index a89d78925637..f33d18f1cf48 100644
@@ -374,7 +374,7 @@ static int sunxi_rsb_read(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
 	mutex_unlock(&rsb->lock);
 
 	pm_runtime_mark_last_busy(rsb->dev);
-	pm_runtime_put_autosuspend(rsb->dev);
+	__pm_runtime_put_autosuspend(rsb->dev);
 
 	return ret;
 }
@@ -418,7 +418,7 @@ static int sunxi_rsb_write(struct sunxi_rsb *rsb, u8 rtaddr, u8 addr,
 	mutex_unlock(&rsb->lock);
 
 	pm_runtime_mark_last_busy(rsb->dev);
-	pm_runtime_put_autosuspend(rsb->dev);
+	__pm_runtime_put_autosuspend(rsb->dev);
 
 	return ret;
 }
Signature · 1 line
2.39.5
author maintainer
#5 lore raw

PATCH 4/51 hwrng: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/char/hw_random/cctrng.c        | 2 +-
 drivers/char/hw_random/omap3-rom-rng.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/char/hw_random/cctrng.c +1 -1
index 4c50efc46483..87288e14bf5f 100644
@@ -99,7 +99,7 @@ static void cc_trng_pm_put_suspend(struct device *dev)
 	int rc = 0;
 
 	pm_runtime_mark_last_busy(dev);
-	rc = pm_runtime_put_autosuspend(dev);
+	rc = __pm_runtime_put_autosuspend(dev);
 	if (rc)
 		dev_err(dev, "pm_runtime_put_autosuspend returned %x\n", rc);
 }
drivers/char/hw_random/omap3-rom-rng.c +1 -1
index 8064c792caf0..e2b95f0d34c6 100644
@@ -57,7 +57,7 @@ static int omap3_rom_rng_read(struct hwrng *rng, void *data, size_t max, bool w)
 		r = 4;
 
 	pm_runtime_mark_last_busy(ddata->dev);
-	pm_runtime_put_autosuspend(ddata->dev);
+	__pm_runtime_put_autosuspend(ddata->dev);
 
 	return r;
 }
Signature · 1 line
2.39.5
author maintainer
#6 lore raw

PATCH 5/51 clk: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/clk/imx/clk-imx8qxp-lpcg.c     | 2 +-
 drivers/clk/imx/clk-scu.c              | 2 +-
 drivers/clk/qcom/lpassaudiocc-sc7280.c | 4 ++--
 drivers/clk/qcom/lpasscorecc-sc7180.c  | 4 ++--
 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/clk/imx/clk-imx8qxp-lpcg.c +1 -1
index d0ccaa040225..3916381ba158 100644
@@ -268,7 +268,7 @@ static int imx_lpcg_parse_clks_from_dt(struct platform_device *pdev,
 		goto unreg;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
drivers/clk/imx/clk-scu.c +1 -1
index b1dd0c08e091..a8f08ab2539b 100644
@@ -568,7 +568,7 @@ static int imx_clk_scu_probe(struct platform_device *pdev)
 	if (!((clk->rsrc == IMX_SC_R_A35) || (clk->rsrc == IMX_SC_R_A53) ||
 	    (clk->rsrc == IMX_SC_R_A72))) {
 		pm_runtime_mark_last_busy(&pdev->dev);
-		pm_runtime_put_autosuspend(&pdev->dev);
+		__pm_runtime_put_autosuspend(&pdev->dev);
 	}
 
 	dev_dbg(dev, "register SCU clock rsrc:%d type:%d\n", clk->rsrc,
drivers/clk/qcom/lpassaudiocc-sc7280.c +2 -2
index 45e726477086..d2093b15a02c 100644
@@ -786,7 +786,7 @@ static int lpass_audio_cc_sc7280_probe(struct platform_device *pdev)
 
 	pm_runtime_mark_last_busy(&pdev->dev);
 exit:
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return ret;
 }
@@ -855,7 +855,7 @@ static int lpass_aon_cc_sc7280_probe(struct platform_device *pdev)
 
 	pm_runtime_mark_last_busy(&pdev->dev);
 exit:
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return ret;
 }
drivers/clk/qcom/lpasscorecc-sc7180.c +2 -2
index 726c6378752f..402b012a6ea5 100644
@@ -415,7 +415,7 @@ static int lpass_core_cc_sc7180_probe(struct platform_device *pdev)
 
 	pm_runtime_mark_last_busy(&pdev->dev);
 exit:
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return ret;
 }
@@ -435,7 +435,7 @@ static int lpass_hm_core_probe(struct platform_device *pdev)
 	ret = qcom_cc_probe_by_index(pdev, 0, desc);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return ret;
 }
Signature · 1 line
2.39.5
author maintainer
#7 lore raw

PATCH 6/51 crypto: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/crypto/ccree/cc_pm.c                     | 2 +-
 drivers/crypto/hisilicon/qm.c                    | 2 +-
 drivers/crypto/omap-aes-gcm.c                    | 2 +-
 drivers/crypto/omap-aes.c                        | 2 +-
 drivers/crypto/omap-des.c                        | 2 +-
 drivers/crypto/omap-sham.c                       | 2 +-
 drivers/crypto/rockchip/rk3288_crypto_ahash.c    | 2 +-
 drivers/crypto/rockchip/rk3288_crypto_skcipher.c | 2 +-
 drivers/crypto/stm32/stm32-crc32.c               | 4 ++--
 drivers/crypto/stm32/stm32-cryp.c                | 2 +-
 drivers/crypto/stm32/stm32-hash.c                | 2 +-
 11 files changed, 12 insertions(+), 12 deletions(-)
drivers/crypto/ccree/cc_pm.c +1 -1
index 6124fbbbed94..e4b7eab2e143 100644
@@ -78,5 +78,5 @@ int cc_pm_get(struct device *dev)
 void cc_pm_put_suspend(struct device *dev)
 {
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
drivers/crypto/hisilicon/qm.c +1 -1
index 07983af9e3e2..13408c43fa20 100644
@@ -840,7 +840,7 @@ static void qm_pm_put_sync(struct hisi_qm *qm)
 		return;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static void qm_cq_head_update(struct hisi_qp *qp)
drivers/crypto/omap-aes-gcm.c +1 -1
index c498950402e8..a5566268d928 100644
@@ -39,7 +39,7 @@ static void omap_aes_gcm_finish_req(struct omap_aes_dev *dd, int ret)
 	crypto_finalize_aead_request(dd->engine, req, ret);
 
 	pm_runtime_mark_last_busy(dd->dev);
-	pm_runtime_put_autosuspend(dd->dev);
+	__pm_runtime_put_autosuspend(dd->dev);
 }
 
 static void omap_aes_gcm_done_task(struct omap_aes_dev *dd)
drivers/crypto/omap-aes.c +1 -1
index bad1adacbc84..bf0d953b8697 100644
@@ -402,7 +402,7 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err)
 	crypto_finalize_skcipher_request(dd->engine, req, err);
 
 	pm_runtime_mark_last_busy(dd->dev);
-	pm_runtime_put_autosuspend(dd->dev);
+	__pm_runtime_put_autosuspend(dd->dev);
 }
 
 int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd)
drivers/crypto/omap-des.c +1 -1
index 209d3dc03a9b..156ef345e7fe 100644
@@ -493,7 +493,7 @@ static void omap_des_finish_req(struct omap_des_dev *dd, int err)
 	crypto_finalize_skcipher_request(dd->engine, req, err);
 
 	pm_runtime_mark_last_busy(dd->dev);
-	pm_runtime_put_autosuspend(dd->dev);
+	__pm_runtime_put_autosuspend(dd->dev);
 }
 
 static int omap_des_crypt_dma_stop(struct omap_des_dev *dd)
drivers/crypto/omap-sham.c +1 -1
index 5bcd9ab0f72a..6b36a1abd371 100644
@@ -1168,7 +1168,7 @@ static void omap_sham_finish_req(struct ahash_request *req, int err)
 			BIT(FLAGS_DMA_READY) | BIT(FLAGS_OUTPUT_READY));
 
 	pm_runtime_mark_last_busy(dd->dev);
-	pm_runtime_put_autosuspend(dd->dev);
+	__pm_runtime_put_autosuspend(dd->dev);
 
 	ctx->offset = 0;
 
drivers/crypto/rockchip/rk3288_crypto_ahash.c +1 -1
index 69d6019d8abc..0c9e1a7ee429 100644
@@ -330,7 +330,7 @@ static int rk_hash_run(struct crypto_engine *engine, void *breq)
 	}
 
 theend:
-	pm_runtime_put_autosuspend(rkc->dev);
+	__pm_runtime_put_autosuspend(rkc->dev);
 
 	rk_hash_unprepare(engine, breq);
 
drivers/crypto/rockchip/rk3288_crypto_skcipher.c +1 -1
index 9393e10671c2..8ed80ab982ed 100644
@@ -413,7 +413,7 @@ static int rk_cipher_run(struct crypto_engine *engine, void *async_req)
 	}
 
 theend:
-	pm_runtime_put_autosuspend(rkc->dev);
+	__pm_runtime_put_autosuspend(rkc->dev);
 
 	local_bh_disable();
 	crypto_finalize_skcipher_request(engine, areq, err);
drivers/crypto/stm32/stm32-crc32.c +2 -2
index e0faddbf8990..366f8ed11b7f 100644
@@ -139,7 +139,7 @@ static int stm32_crc_init(struct shash_desc *desc)
 	spin_unlock_irqrestore(&crc->lock, flags);
 
 	pm_runtime_mark_last_busy(crc->dev);
-	pm_runtime_put_autosuspend(crc->dev);
+	__pm_runtime_put_autosuspend(crc->dev);
 
 	return 0;
 }
@@ -209,7 +209,7 @@ static int burst_update(struct shash_desc *desc, const u8 *d8,
 
 pm_out:
 	pm_runtime_mark_last_busy(crc->dev);
-	pm_runtime_put_autosuspend(crc->dev);
+	__pm_runtime_put_autosuspend(crc->dev);
 
 	return 0;
 }
drivers/crypto/stm32/stm32-cryp.c +1 -1
index 937f6dab8955..c4f926925f03 100644
@@ -852,7 +852,7 @@ static void stm32_cryp_finish_req(struct stm32_cryp *cryp, int err)
 		stm32_cryp_get_iv(cryp);
 
 	pm_runtime_mark_last_busy(cryp->dev);
-	pm_runtime_put_autosuspend(cryp->dev);
+	__pm_runtime_put_autosuspend(cryp->dev);
 
 	if (is_gcm(cryp) || is_ccm(cryp))
 		crypto_finalize_aead_request(cryp->engine, cryp->areq, err);
drivers/crypto/stm32/stm32-hash.c +1 -1
index 351827372ea6..0d4b8a491620 100644
@@ -1374,7 +1374,7 @@ static void stm32_hash_unprepare_request(struct ahash_request *req)
 
 pm_runtime:
 	pm_runtime_mark_last_busy(hdev->dev);
-	pm_runtime_put_autosuspend(hdev->dev);
+	__pm_runtime_put_autosuspend(hdev->dev);
 }
 
 static int stm32_hash_enqueue(struct ahash_request *req, unsigned int op)
Signature · 1 line
2.39.5
author maintainer
#8 lore raw

PATCH 7/51 dmaengine: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/dma/at_xdmac.c          | 24 ++++++++++++------------
 drivers/dma/pl330.c             | 14 +++++++-------
 drivers/dma/qcom/bam_dma.c      | 10 +++++-----
 drivers/dma/qcom/hidma.c        | 18 +++++++++---------
 drivers/dma/qcom/hidma_dbg.c    |  2 +-
 drivers/dma/qcom/hidma_mgmt.c   |  4 ++--
 drivers/dma/ste_dma40.c         | 16 ++++++++--------
 drivers/dma/ti/cppi41.c         | 10 +++++-----
 drivers/dma/xilinx/zynqmp_dma.c |  2 +-
 9 files changed, 50 insertions(+), 50 deletions(-)
drivers/dma/at_xdmac.c +12 -12
index 299396121e6d..88637bcfb760 100644
@@ -380,7 +380,7 @@ static void at_xdmac_runtime_suspend_descriptors(struct at_xdmac_chan *atchan)
 			continue;
 
 		pm_runtime_mark_last_busy(atxdmac->dev);
-		pm_runtime_put_autosuspend(atxdmac->dev);
+		__pm_runtime_put_autosuspend(atxdmac->dev);
 	}
 }
 
@@ -414,7 +414,7 @@ static bool at_xdmac_chan_is_enabled(struct at_xdmac_chan *atchan)
 	ret = !!(at_xdmac_chan_read(atchan, AT_XDMAC_GS) & atchan->mask);
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return ret;
 }
@@ -447,7 +447,7 @@ static void at_xdmac_off(struct at_xdmac *atxdmac, bool suspend_descriptors)
 	}
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 }
 
 /* Call with lock hold. */
@@ -1675,7 +1675,7 @@ at_xdmac_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
 spin_unlock:
 	spin_unlock_irqrestore(&atchan->lock, flags);
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 	return ret;
 }
 
@@ -1757,7 +1757,7 @@ static void at_xdmac_handle_error(struct at_xdmac_chan *atchan)
 		bad_desc->lld.mbr_ubc);
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	/* Then continue with usual descriptor management */
 }
@@ -1821,7 +1821,7 @@ static void at_xdmac_tasklet(struct tasklet_struct *t)
 	 * at_xdmac_start_xfer().
 	 */
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 }
 
 static irqreturn_t at_xdmac_interrupt(int irq, void *dev_id)
@@ -1953,7 +1953,7 @@ static int at_xdmac_device_pause(struct dma_chan *chan)
 	spin_unlock_irqrestore(&atchan->lock, flags);
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return 0;
 }
@@ -1997,7 +1997,7 @@ static int at_xdmac_device_resume(struct dma_chan *chan)
 unlock:
 	spin_unlock_irqrestore(&atchan->lock, flags);
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return ret;
 }
@@ -2032,7 +2032,7 @@ static int at_xdmac_device_terminate_all(struct dma_chan *chan)
 		 * to release it.
 		 */
 		if (desc->active_xfer) {
-			pm_runtime_put_autosuspend(atxdmac->dev);
+			__pm_runtime_put_autosuspend(atxdmac->dev);
 			pm_runtime_mark_last_busy(atxdmac->dev);
 		}
 	}
@@ -2042,7 +2042,7 @@ static int at_xdmac_device_terminate_all(struct dma_chan *chan)
 	spin_unlock_irqrestore(&atchan->lock, flags);
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return 0;
 }
@@ -2236,7 +2236,7 @@ static int __maybe_unused atmel_xdmac_resume(struct device *dev)
 	}
 
 	pm_runtime_mark_last_busy(atxdmac->dev);
-	pm_runtime_put_autosuspend(atxdmac->dev);
+	__pm_runtime_put_autosuspend(atxdmac->dev);
 
 	return 0;
 }
@@ -2413,7 +2413,7 @@ static int at_xdmac_probe(struct platform_device *pdev)
 	at_xdmac_axi_config(pdev);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
drivers/dma/pl330.c +7 -7
index 82a9fe88ad54..614cc0bcacd1 100644
@@ -2135,7 +2135,7 @@ static void pl330_tasklet(struct tasklet_struct *t)
 	/* If work list empty, power down */
 	if (power_down) {
 		pm_runtime_mark_last_busy(pch->dmac->ddma.dev);
-		pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
+		__pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
 	}
 }
 
@@ -2315,8 +2315,8 @@ static int pl330_terminate_all(struct dma_chan *chan)
 	spin_unlock_irqrestore(&pch->lock, flags);
 	pm_runtime_mark_last_busy(pl330->ddma.dev);
 	if (power_down)
-		pm_runtime_put_autosuspend(pl330->ddma.dev);
-	pm_runtime_put_autosuspend(pl330->ddma.dev);
+		__pm_runtime_put_autosuspend(pl330->ddma.dev);
+	__pm_runtime_put_autosuspend(pl330->ddma.dev);
 
 	return 0;
 }
@@ -2348,7 +2348,7 @@ static int pl330_pause(struct dma_chan *chan)
 	}
 	spin_unlock_irqrestore(&pch->lock, flags);
 	pm_runtime_mark_last_busy(pl330->ddma.dev);
-	pm_runtime_put_autosuspend(pl330->ddma.dev);
+	__pm_runtime_put_autosuspend(pl330->ddma.dev);
 
 	return 0;
 }
@@ -2372,7 +2372,7 @@ static void pl330_free_chan_resources(struct dma_chan *chan)
 
 	spin_unlock_irqrestore(&pl330->lock, flags);
 	pm_runtime_mark_last_busy(pch->dmac->ddma.dev);
-	pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
+	__pm_runtime_put_autosuspend(pch->dmac->ddma.dev);
 	pl330_unprep_slave_fifo(pch);
 }
 
@@ -2394,7 +2394,7 @@ static int pl330_get_current_xferred_count(struct dma_pl330_chan *pch,
 		addr = desc->px.dst_addr;
 	}
 	pm_runtime_mark_last_busy(pch->dmac->ddma.dev);
-	pm_runtime_put_autosuspend(pl330->ddma.dev);
+	__pm_runtime_put_autosuspend(pl330->ddma.dev);
 
 	/* If DMAMOV hasn't finished yet, SAR/DAR can be zero */
 	if (!val)
@@ -3177,7 +3177,7 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id)
 	pm_runtime_use_autosuspend(&adev->dev);
 	pm_runtime_set_autosuspend_delay(&adev->dev, PL330_AUTOSUSPEND_DELAY);
 	pm_runtime_mark_last_busy(&adev->dev);
-	pm_runtime_put_autosuspend(&adev->dev);
+	__pm_runtime_put_autosuspend(&adev->dev);
 
 	return 0;
 probe_err3:
drivers/dma/qcom/bam_dma.c +5 -5
index d43a881e43b9..39e174ffc47e 100644
@@ -609,7 +609,7 @@ static void bam_free_chan(struct dma_chan *chan)
 
 err:
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 }
 
 /**
@@ -785,7 +785,7 @@ static int bam_pause(struct dma_chan *chan)
 	bchan->paused = 1;
 	spin_unlock_irqrestore(&bchan->vc.lock, flag);
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 
 	return 0;
 }
@@ -811,7 +811,7 @@ static int bam_resume(struct dma_chan *chan)
 	bchan->paused = 0;
 	spin_unlock_irqrestore(&bchan->vc.lock, flag);
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 
 	return 0;
 }
@@ -928,7 +928,7 @@ static irqreturn_t bam_dma_irq(int irq, void *data)
 	}
 
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 
 	return IRQ_HANDLED;
 }
@@ -1103,7 +1103,7 @@ static void bam_start_dma(struct bam_chan *bchan)
 			bam_addr(bdev, bchan->id, BAM_P_EVNT_REG));
 
 	pm_runtime_mark_last_busy(bdev->dev);
-	pm_runtime_put_autosuspend(bdev->dev);
+	__pm_runtime_put_autosuspend(bdev->dev);
 }
 
 /**
drivers/dma/qcom/hidma.c +9 -9
index 4d2cd8d9ec74..2f0da730003e 100644
@@ -186,7 +186,7 @@ static void hidma_callback(void *data)
 
 	if (queued) {
 		pm_runtime_mark_last_busy(dmadev->ddev.dev);
-		pm_runtime_put_autosuspend(dmadev->ddev.dev);
+		__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	}
 }
 
@@ -317,11 +317,11 @@ static dma_cookie_t hidma_tx_submit(struct dma_async_tx_descriptor *txd)
 	pm_runtime_get_sync(dmadev->ddev.dev);
 	if (!hidma_ll_isenabled(dmadev->lldev)) {
 		pm_runtime_mark_last_busy(dmadev->ddev.dev);
-		pm_runtime_put_autosuspend(dmadev->ddev.dev);
+		__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 		return -ENODEV;
 	}
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 
 	mdesc = container_of(txd, struct hidma_desc, desc);
 	spin_lock_irqsave(&mchan->lock, irqflags);
@@ -508,7 +508,7 @@ static int hidma_terminate_channel(struct dma_chan *chan)
 	rc = hidma_ll_enable(dmadev->lldev);
 out:
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return rc;
 }
 
@@ -526,7 +526,7 @@ static int hidma_terminate_all(struct dma_chan *chan)
 	pm_runtime_get_sync(dmadev->ddev.dev);
 	rc = hidma_ll_setup(dmadev->lldev);
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return rc;
 }
 
@@ -570,7 +570,7 @@ static int hidma_pause(struct dma_chan *chan)
 			dev_warn(dmadev->ddev.dev, "channel did not stop\n");
 		mchan->paused = true;
 		pm_runtime_mark_last_busy(dmadev->ddev.dev);
-		pm_runtime_put_autosuspend(dmadev->ddev.dev);
+		__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	}
 	return 0;
 }
@@ -592,7 +592,7 @@ static int hidma_resume(struct dma_chan *chan)
 			dev_err(dmadev->ddev.dev,
 				"failed to resume the channel");
 		pm_runtime_mark_last_busy(dmadev->ddev.dev);
-		pm_runtime_put_autosuspend(dmadev->ddev.dev);
+		__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	}
 	return rc;
 }
@@ -883,7 +883,7 @@ static int hidma_probe(struct platform_device *pdev)
 	hidma_sysfs_init(dmadev);
 	dev_info(&pdev->dev, "HI-DMA engine driver registration complete\n");
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return 0;
 
 uninit:
@@ -910,7 +910,7 @@ static void hidma_shutdown(struct platform_device *pdev)
 	if (hidma_ll_disable(dmadev->lldev))
 		dev_warn(dmadev->ddev.dev, "channel did not stop\n");
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 
 }
 
drivers/dma/qcom/hidma_dbg.c +1 -1
index ce87c7937a0e..90e758193feb 100644
@@ -104,7 +104,7 @@ static int hidma_chan_show(struct seq_file *s, void *unused)
 
 	hidma_ll_devstats(s, mchan->dmadev->lldev);
 	pm_runtime_mark_last_busy(dmadev->ddev.dev);
-	pm_runtime_put_autosuspend(dmadev->ddev.dev);
+	__pm_runtime_put_autosuspend(dmadev->ddev.dev);
 	return 0;
 }
 
drivers/dma/qcom/hidma_mgmt.c +2 -2
index 4805ce390ffa..f99a9f45c18f 100644
@@ -151,7 +151,7 @@ int hidma_mgmt_setup(struct hidma_mgmt_dev *mgmtdev)
 	writel(val, mgmtdev->virtaddr + HIDMA_CHRESET_TIMEOUT_OFFSET);
 
 	pm_runtime_mark_last_busy(&mgmtdev->pdev->dev);
-	pm_runtime_put_autosuspend(&mgmtdev->pdev->dev);
+	__pm_runtime_put_autosuspend(&mgmtdev->pdev->dev);
 	return 0;
 }
 EXPORT_SYMBOL_GPL(hidma_mgmt_setup);
@@ -306,7 +306,7 @@ static int hidma_mgmt_probe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, mgmtdev);
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 	return 0;
 out:
 	pm_runtime_put_sync_suspend(&pdev->dev);
drivers/dma/ste_dma40.c +8 -8
index d52e1685aed5..58793d81448b 100644
@@ -1453,7 +1453,7 @@ static int d40_pause(struct dma_chan *chan)
 	res = d40_channel_execute_command(d40c, D40_DMA_SUSPEND_REQ);
 
 	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
+	__pm_runtime_put_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return res;
 }
@@ -1480,7 +1480,7 @@ static int d40_resume(struct dma_chan *chan)
 		res = d40_channel_execute_command(d40c, D40_DMA_RUN);
 
 	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
+	__pm_runtime_put_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return res;
 }
@@ -1582,7 +1582,7 @@ static void dma_tc_handle(struct d40_chan *d40c)
 			d40c->busy = false;
 
 			pm_runtime_mark_last_busy(d40c->base->dev);
-			pm_runtime_put_autosuspend(d40c->base->dev);
+			__pm_runtime_put_autosuspend(d40c->base->dev);
 		}
 
 		d40_desc_remove(d40d);
@@ -2056,7 +2056,7 @@ static int d40_free_dma(struct d40_chan *d40c)
 
 	if (d40c->busy) {
 		pm_runtime_mark_last_busy(d40c->base->dev);
-		pm_runtime_put_autosuspend(d40c->base->dev);
+		__pm_runtime_put_autosuspend(d40c->base->dev);
 	}
 
 	d40c->busy = false;
@@ -2064,7 +2064,7 @@ static int d40_free_dma(struct d40_chan *d40c)
 	d40c->configured = false;
  mark_last_busy:
 	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
+	__pm_runtime_put_autosuspend(d40c->base->dev);
 	return res;
 }
 
@@ -2467,7 +2467,7 @@ static int d40_alloc_chan_resources(struct dma_chan *chan)
 		d40_config_write(d40c);
  mark_last_busy:
 	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
+	__pm_runtime_put_autosuspend(d40c->base->dev);
 	spin_unlock_irqrestore(&d40c->lock, flags);
 	return err;
 }
@@ -2619,10 +2619,10 @@ static int d40_terminate_all(struct dma_chan *chan)
 
 	d40_term_all(d40c);
 	pm_runtime_mark_last_busy(d40c->base->dev);
-	pm_runtime_put_autosuspend(d40c->base->dev);
+	__pm_runtime_put_autosuspend(d40c->base->dev);
 	if (d40c->busy) {
 		pm_runtime_mark_last_busy(d40c->base->dev);
-		pm_runtime_put_autosuspend(d40c->base->dev);
+		__pm_runtime_put_autosuspend(d40c->base->dev);
 	}
 	d40c->busy = false;
 
drivers/dma/ti/cppi41.c +5 -5
index a8bb70c2d109..ebdc7fd9df84 100644
@@ -391,7 +391,7 @@ static int cppi41_dma_alloc_chan_resources(struct dma_chan *chan)
 		cppi_writel(c->q_num, c->gcr_reg + RXHPCRA0);
 
 	pm_runtime_mark_last_busy(cdd->ddev.dev);
-	pm_runtime_put_autosuspend(cdd->ddev.dev);
+	__pm_runtime_put_autosuspend(cdd->ddev.dev);
 
 	return 0;
 }
@@ -412,7 +412,7 @@ static void cppi41_dma_free_chan_resources(struct dma_chan *chan)
 	WARN_ON(!list_empty(&cdd->pending));
 
 	pm_runtime_mark_last_busy(cdd->ddev.dev);
-	pm_runtime_put_autosuspend(cdd->ddev.dev);
+	__pm_runtime_put_autosuspend(cdd->ddev.dev);
 }
 
 static enum dma_status cppi41_dma_tx_status(struct dma_chan *chan,
@@ -510,7 +510,7 @@ static void cppi41_dma_issue_pending(struct dma_chan *chan)
 	spin_unlock_irqrestore(&cdd->lock, flags);
 
 	pm_runtime_mark_last_busy(cdd->ddev.dev);
-	pm_runtime_put_autosuspend(cdd->ddev.dev);
+	__pm_runtime_put_autosuspend(cdd->ddev.dev);
 }
 
 static u32 get_host_pd0(u32 length)
@@ -628,7 +628,7 @@ static struct dma_async_tx_descriptor *cppi41_dma_prep_slave_sg(
 
 err_out_not_ready:
 	pm_runtime_mark_last_busy(cdd->ddev.dev);
-	pm_runtime_put_autosuspend(cdd->ddev.dev);
+	__pm_runtime_put_autosuspend(cdd->ddev.dev);
 
 	return txd;
 }
@@ -1140,7 +1140,7 @@ static int cppi41_dma_probe(struct platform_device *pdev)
 		goto err_of;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 err_of:
drivers/dma/xilinx/zynqmp_dma.c +1 -1
index 9ae46f1198fe..4664858f5a1c 100644
@@ -696,7 +696,7 @@ static void zynqmp_dma_free_chan_resources(struct dma_chan *dchan)
 		chan->desc_pool_v, chan->desc_pool_p);
 	kfree(chan->sw_desc_pool);
 	pm_runtime_mark_last_busy(chan->dev);
-	pm_runtime_put_autosuspend(chan->dev);
+	__pm_runtime_put_autosuspend(chan->dev);
 }
 
 /**
Signature · 1 line
2.39.5
author maintainer
#9 lore raw

PATCH 8/51 gpio: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/gpio/gpio-arizona.c | 10 +++++-----
 drivers/gpio/gpio-mxc.c     |  2 +-
 2 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpio/gpio-arizona.c +5 -5
index c15fda99120a..692983da7949 100644
@@ -40,7 +40,7 @@ static int arizona_gpio_direction_in(struct gpio_chip *chip, unsigned offset)
 
 	if (change && persistent) {
 		pm_runtime_mark_last_busy(chip->parent);
-		pm_runtime_put_autosuspend(chip->parent);
+		__pm_runtime_put_autosuspend(chip->parent);
 	}
 
 	return 0;
@@ -63,7 +63,7 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
 		ret = pm_runtime_get_sync(chip->parent);
 		if (ret < 0) {
 			dev_err(chip->parent, "Failed to resume: %d\n", ret);
-			pm_runtime_put_autosuspend(chip->parent);
+			__pm_runtime_put_autosuspend(chip->parent);
 			return ret;
 		}
 
@@ -72,18 +72,18 @@ static int arizona_gpio_get(struct gpio_chip *chip, unsigned offset)
 		if (ret < 0) {
 			dev_err(chip->parent, "Failed to drop cache: %d\n",
 				ret);
-			pm_runtime_put_autosuspend(chip->parent);
+			__pm_runtime_put_autosuspend(chip->parent);
 			return ret;
 		}
 
 		ret = regmap_read(arizona->regmap, reg, &val);
 		if (ret < 0) {
-			pm_runtime_put_autosuspend(chip->parent);
+			__pm_runtime_put_autosuspend(chip->parent);
 			return ret;
 		}
 
 		pm_runtime_mark_last_busy(chip->parent);
-		pm_runtime_put_autosuspend(chip->parent);
+		__pm_runtime_put_autosuspend(chip->parent);
 	}
 
 	if (val & ARIZONA_GPN_LVL)
drivers/gpio/gpio-mxc.c +1 -1
index 4cb455b2bdee..ea7e7d28aa19 100644
@@ -520,7 +520,7 @@ static int mxc_gpio_probe(struct platform_device *pdev)
 	list_add_tail(&port->node, &mxc_gpio_ports);
 
 	platform_set_drvdata(pdev, port);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
Signature · 1 line
2.39.5
#10 lore raw

Re: [PATCH 08/51] gpio: Switch to __pm_runtime_put_autosuspend()

Quoted 8 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---

Sakari,

You didn't Cc me on the cover letter, please do it next time whenever you post such a big series.

I got the cover letter from lore but it doesn't explain how this will be merged, are there prerequisites earlier in the series? Or are the patches independent? If the latter, why not send them separately targeting individual subsystems?

Bart

author maintainer
#11 lore raw

Re: [PATCH 08/51] gpio: Switch to __pm_runtime_put_autosuspend()

Hi Bart,

Quoted 8 lines · Bartosz Golaszewski
Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

Quoted 7 lines
Quoted 2 lines

---

Sakari,

You didn't Cc me on the cover letter, please do it next time whenever you post such a big series.

I thought of that but it would have included 120 more recipients. That wouldn't make it through to most lists.

Quoted 5 lines

I got the cover letter from lore but it doesn't explain how this will be merged, are there prerequisites earlier in the series? Or are the patches independent? If the latter, why not send them separately targeting individual subsystems?

This patch can be merged independently and my intention was the tree maintainers could pick them.

Signature · 3 lines
Kind regards,

Sakari Ailus
author maintainer
#12 lore raw

PATCH 9/51 drm/amd: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c      |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_connectors.c    |  16 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c   | 120 ++++++------
 drivers/gpu/drm/amd/amdgpu/amdgpu_display.c   |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c       |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c     |   6 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c       |   4 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c       |   2 +-
 .../gpu/drm/amd/amdgpu/amdgpu_securedisplay.c |   4 +-
 drivers/gpu/drm/amd/amdkfd/kfd_process.c      |   4 +-
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c |   2 +-
 drivers/gpu/drm/amd/pm/amdgpu_pm.c            | 178 +++++++++---------
 14 files changed, 177 insertions(+), 177 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c +1 -1
index f85ace0384d2..1027873da5ea 100644
@@ -495,7 +495,7 @@ static int amdgpu_atif_handler(struct amdgpu_device *adev,
 				/* Just fire off a uevent and let userspace tell us what to do */
 				drm_helper_hpd_irq_event(adev_to_drm(adev));
 				pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-				pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+				__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 			}
 		}
 		/* TODO: check other events */
drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c +8 -8
index 344e0a9ee08a..c31969f5c6ef 100644
@@ -714,7 +714,7 @@ amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -739,7 +739,7 @@ amdgpu_connector_lvds_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -865,7 +865,7 @@ amdgpu_connector_vga_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -924,7 +924,7 @@ amdgpu_connector_vga_detect(struct drm_connector *connector, bool force)
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -1025,7 +1025,7 @@ amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1151,7 +1151,7 @@ amdgpu_connector_dvi_detect(struct drm_connector *connector, bool force)
 exit:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -1375,7 +1375,7 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1451,7 +1451,7 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force)
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c +60 -60

468 lines not on this page · raw message

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c +1 -1
index b119d27271c1..b2bd0cfaacbb 100644
@@ -348,7 +348,7 @@ int amdgpu_display_crtc_set_config(struct drm_mode_set *set,
 		adev->have_disp_power_ref = false;
 out:
 	/* drop the power reference we got coming in here */
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c +3 -3
index bb06cb20041c..57dce06b246a 100644
@@ -2182,7 +2182,7 @@ static void amdgpu_get_secondary_funcs(struct amdgpu_device *adev)
 		if (p) {
 			pm_runtime_get_sync(&p->dev);
 			pm_runtime_mark_last_busy(&p->dev);
-			pm_runtime_put_autosuspend(&p->dev);
+			__pm_runtime_put_autosuspend(&p->dev);
 			pci_dev_put(p);
 		}
 	}
@@ -2391,7 +2391,7 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
 		pm_runtime_allow(ddev->dev);
 
 		pm_runtime_mark_last_busy(ddev->dev);
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 
 		pci_wake_from_d3(pdev, TRUE);
 
@@ -2810,7 +2810,7 @@ long amdgpu_drm_ioctl(struct file *filp,
 
 	pm_runtime_mark_last_busy(dev->dev);
 out:
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c +3 -3
index 2f24a6aa13bf..cf555ec0f816 100644
@@ -307,7 +307,7 @@ bool amdgpu_fence_process(struct amdgpu_ring *ring)
 		dma_fence_signal(fence);
 		dma_fence_put(fence);
 		pm_runtime_mark_last_busy(adev_to_drm(adev)->dev);
-		pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
+		__pm_runtime_put_autosuspend(adev_to_drm(adev)->dev);
 	} while (last_seq != seq);
 
 	return true;
@@ -948,7 +948,7 @@ static int gpu_recover_get(void *data, u64 *val)
 
 	r = pm_runtime_get_sync(dev->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return 0;
 	}
 
@@ -958,7 +958,7 @@ static int gpu_recover_get(void *data, u64 *val)
 	*val = atomic_read(&adev->reset_domain->reset_res);
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
 }
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +2 -2
index 2fe75c920a73..278527cdddef 100644
@@ -1495,14 +1495,14 @@ static ssize_t amdgpu_gfx_set_run_cleaner_shader(struct device *dev,
 
 	ret = pm_runtime_get_sync(ddev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(ddev->dev);
+		__pm_runtime_put_autosuspend(ddev->dev);
 		return ret;
 	}
 
 	ret = amdgpu_gfx_run_cleaner_shader(adev, value);
 
 	pm_runtime_mark_last_busy(ddev->dev);
-	pm_runtime_put_autosuspend(ddev->dev);
+	__pm_runtime_put_autosuspend(ddev->dev);
 
 	if (ret)
 		return ret;
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c +2 -2
index 016a6f6c4267..2d0e9bebaafd 100644
@@ -1383,7 +1383,7 @@ int amdgpu_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 out_suspend:
 	pm_runtime_mark_last_busy(dev->dev);
 pm_put:
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return r;
 }
@@ -1450,7 +1450,7 @@ void amdgpu_driver_postclose_kms(struct drm_device *dev,
 	file_priv->driver_priv = NULL;
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 }
 
 
drivers/gpu/drm/amd/amdgpu/amdgpu_rap.c +2 -2
index 123bcf5c2bb1..5f85cb9102a3 100644
@@ -60,7 +60,7 @@ static ssize_t amdgpu_rap_debugfs_write(struct file *f, const char __user *buf,
 
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -102,7 +102,7 @@ static ssize_t amdgpu_rap_debugfs_write(struct file *f, const char __user *buf,
 
 	amdgpu_gfx_off_ctrl(adev, true);
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return size;
 }
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c +1 -1
index 1d9eda883bb8..00f270a604b6 100644
@@ -3511,7 +3511,7 @@ static void amdgpu_ras_counte_dw(struct work_struct *work)
 
 	pm_runtime_mark_last_busy(dev->dev);
 Out:
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 }
 
 static int amdgpu_get_ras_schema(struct amdgpu_device *adev)
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c +2 -2
index 41ebe690eeff..d461181e10f2 100644
@@ -110,7 +110,7 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __u
 
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -160,7 +160,7 @@ static ssize_t amdgpu_securedisplay_debugfs_write(struct file *f, const char __u
 	}
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return size;
 }
drivers/gpu/drm/amd/amdkfd/kfd_process.c +2 -2
index d07acf1b2f93..3011fe9927f4 100644
@@ -1081,7 +1081,7 @@ static void kfd_process_destroy_pdds(struct kfd_process *p)
 		 */
 		if (pdd->runtime_inuse) {
 			pm_runtime_mark_last_busy(adev_to_drm(pdd->dev->adev)->dev);
-			pm_runtime_put_autosuspend(adev_to_drm(pdd->dev->adev)->dev);
+			__pm_runtime_put_autosuspend(adev_to_drm(pdd->dev->adev)->dev);
 			pdd->runtime_inuse = false;
 		}
 
@@ -1766,7 +1766,7 @@ struct kfd_process_device *kfd_bind_process_to_device(struct kfd_node *dev,
 	if (!pdd->runtime_inuse) {
 		err = pm_runtime_get_sync(adev_to_drm(dev->adev)->dev);
 		if (err < 0) {
-			pm_runtime_put_autosuspend(adev_to_drm(dev->adev)->dev);
+			__pm_runtime_put_autosuspend(adev_to_drm(dev->adev)->dev);
 			return ERR_PTR(err);
 		}
 	}
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +1 -1
index d1ca9e709946..a7be15e8c06e 100644
@@ -10102,7 +10102,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
 	 * displays anymore
 	 */
 	for (i = 0; i < crtc_disable_count; i++)
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 	pm_runtime_mark_last_busy(dev->dev);
 }
 
drivers/gpu/drm/amd/pm/amdgpu_pm.c +89 -89

710 lines not on this page · raw message

Signature · 1 line
2.39.5
author maintainer
#13 lore raw

PATCH 10/51 drm/nouveau: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/gpu/drm/nouveau/dispnv50/disp.c     | 10 +++++-----
 drivers/gpu/drm/nouveau/nouveau_connector.c |  4 ++--
 drivers/gpu/drm/nouveau/nouveau_debugfs.c   |  8 ++++----
 drivers/gpu/drm/nouveau/nouveau_display.c   |  4 ++--
 drivers/gpu/drm/nouveau/nouveau_drm.c       | 10 +++++-----
 drivers/gpu/drm/nouveau/nouveau_gem.c       | 10 +++++-----
 6 files changed, 23 insertions(+), 23 deletions(-)
drivers/gpu/drm/nouveau/dispnv50/disp.c +5 -5
index eed579a6c858..63710ce16ec2 100644
@@ -1205,7 +1205,7 @@ nv50_mstc_detect(struct drm_connector *connector,
 
 	ret = pm_runtime_get_sync(connector->dev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 		return connector_status_disconnected;
 	}
 
@@ -1216,7 +1216,7 @@ nv50_mstc_detect(struct drm_connector *connector,
 
 out:
 	pm_runtime_mark_last_busy(connector->dev->dev);
-	pm_runtime_put_autosuspend(connector->dev->dev);
+	__pm_runtime_put_autosuspend(connector->dev->dev);
 	return ret;
 }
 
@@ -2405,7 +2405,7 @@ nv50_disp_atomic_commit_tail(struct drm_atomic_state *state)
 
 	/* Drop the RPM ref we got from nv50_disp_atomic_commit() */
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 }
 
 static void
@@ -2426,7 +2426,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,
 
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -2475,7 +2475,7 @@ nv50_disp_atomic_commit(struct drm_device *dev,
 	if (ret)
 		drm_atomic_helper_unprepare_planes(dev, state);
 done:
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
drivers/gpu/drm/nouveau/nouveau_connector.c +2 -2
index 8d5c9c74cbb9..cd42a198b658 100644
@@ -582,7 +582,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
 	} else {
 		ret = pm_runtime_get_sync(dev->dev);
 		if (ret < 0 && ret != -EACCES) {
-			pm_runtime_put_autosuspend(dev->dev);
+			__pm_runtime_put_autosuspend(dev->dev);
 			nouveau_connector_set_edid(nv_connector, NULL);
 			return conn_status;
 		}
@@ -674,7 +674,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
 		drm_dp_cec_unset_edid(&nv_connector->aux);
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return conn_status;
 }
drivers/gpu/drm/nouveau/nouveau_debugfs.c +4 -4
index e83db051e851..2967772b8623 100644
@@ -55,7 +55,7 @@ nouveau_debugfs_strap_peek(struct seq_file *m, void *data)
 
 	ret = pm_runtime_get_sync(drm->dev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(drm->dev->dev);
+		__pm_runtime_put_autosuspend(drm->dev->dev);
 		return ret;
 	}
 
@@ -63,7 +63,7 @@ nouveau_debugfs_strap_peek(struct seq_file *m, void *data)
 		   nvif_rd32(&drm->client.device.object, 0x101000));
 
 	pm_runtime_mark_last_busy(drm->dev->dev);
-	pm_runtime_put_autosuspend(drm->dev->dev);
+	__pm_runtime_put_autosuspend(drm->dev->dev);
 
 	return 0;
 }
@@ -184,13 +184,13 @@ nouveau_debugfs_pstate_set(struct file *file, const char __user *ubuf,
 
 	ret = pm_runtime_get_sync(drm->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(drm->dev);
+		__pm_runtime_put_autosuspend(drm->dev);
 		return ret;
 	}
 
 	ret = nvif_mthd(&debugfs->ctrl, NVIF_CONTROL_PSTATE_USER,
 			&args, sizeof(args));
-	pm_runtime_put_autosuspend(drm->dev);
+	__pm_runtime_put_autosuspend(drm->dev);
 	if (ret < 0)
 		return ret;
 
drivers/gpu/drm/nouveau/nouveau_display.c +2 -2
index e2fd561cd23f..8cb906684a78 100644
@@ -536,7 +536,7 @@ nouveau_display_hpd_work(struct work_struct *work)
 
 	pm_runtime_mark_last_busy(drm->dev->dev);
 noop:
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 }
 
 #ifdef CONFIG_ACPI
@@ -557,7 +557,7 @@ nouveau_display_acpi_ntfy(struct notifier_block *nb, unsigned long val,
 				 * where we can't wake it up, it can handle
 				 * it's own hotplug events.
 				 */
-				pm_runtime_put_autosuspend(drm->dev->dev);
+				__pm_runtime_put_autosuspend(drm->dev->dev);
 			} else if (ret == 0 || ret == -EINPROGRESS) {
 				/* We've started resuming the GPU already, so
 				 * it will handle scheduling a full reprobe
drivers/gpu/drm/nouveau/nouveau_drm.c +5 -5
index 84d692d68817..ecb1fc98f758 100644
@@ -1165,7 +1165,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
 	/* need to bring up power immediately if opening device */
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -1197,7 +1197,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
 	}
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
@@ -1231,7 +1231,7 @@ nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
 	nouveau_cli_fini(cli);
 	kfree(cli);
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	drm_dev_exit(dev_index);
 }
 
@@ -1265,7 +1265,7 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -1279,7 +1279,7 @@ nouveau_drm_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 	}
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
drivers/gpu/drm/nouveau/nouveau_gem.c +5 -5
index 9ae2cee1c7c5..37814e22d91f 100644
@@ -83,7 +83,7 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
 
 	ret = pm_runtime_get_sync(dev);
 	if (WARN_ON(ret < 0 && ret != -EACCES)) {
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		return;
 	}
 
@@ -93,7 +93,7 @@ nouveau_gem_object_del(struct drm_gem_object *gem)
 	ttm_bo_put(&nvbo->bo);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 int
@@ -121,7 +121,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
 
 	ret = pm_runtime_get_sync(dev);
 	if (ret < 0 && ret != -EACCES) {
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		goto out;
 	}
 
@@ -131,7 +131,7 @@ nouveau_gem_object_open(struct drm_gem_object *gem, struct drm_file *file_priv)
 	else
 		ret = 0;
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 out:
 	ttm_bo_unreserve(&nvbo->bo);
 	return ret;
@@ -211,7 +211,7 @@ nouveau_gem_object_close(struct drm_gem_object *gem, struct drm_file *file_priv)
 				nouveau_gem_object_unmap(nvbo, vma);
 				pm_runtime_mark_last_busy(dev);
 			}
-			pm_runtime_put_autosuspend(dev);
+			__pm_runtime_put_autosuspend(dev);
 		}
 	}
 	ttm_bo_unreserve(&nvbo->bo);
Signature · 1 line
2.39.5
author maintainer
#14 lore raw

PATCH 11/51 drm/radeon: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/gpu/drm/radeon/radeon_acpi.c       |  2 +-
 drivers/gpu/drm/radeon/radeon_connectors.c | 20 ++++++++++----------
 drivers/gpu/drm/radeon/radeon_display.c    |  6 +++---
 drivers/gpu/drm/radeon/radeon_drv.c        |  4 ++--
 drivers/gpu/drm/radeon/radeon_fbdev.c      |  4 ++--
 drivers/gpu/drm/radeon/radeon_kms.c        | 10 +++++-----
 6 files changed, 23 insertions(+), 23 deletions(-)
drivers/gpu/drm/radeon/radeon_acpi.c +1 -1
index 22ce61bdfc06..92721df2e43c 100644
@@ -409,7 +409,7 @@ static int radeon_atif_handler(struct radeon_device *rdev,
 			/* Just fire off a uevent and let userspace tell us what to do */
 			drm_helper_hpd_irq_event(rdev_to_drm(rdev));
 			pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
-			pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
+			__pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
 		}
 	}
 	/* TODO: check other events */
drivers/gpu/drm/radeon/radeon_connectors.c +10 -10
index 528a8f3677c2..d6c58af369e5 100644
@@ -848,7 +848,7 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -877,7 +877,7 @@ radeon_lvds_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -996,7 +996,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1068,7 +1068,7 @@ radeon_vga_detect(struct drm_connector *connector, bool force)
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -1138,7 +1138,7 @@ radeon_tv_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1156,7 +1156,7 @@ radeon_tv_detect(struct drm_connector *connector, bool force)
 
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -1224,7 +1224,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1414,7 +1414,7 @@ radeon_dvi_detect(struct drm_connector *connector, bool force)
 exit:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
@@ -1643,7 +1643,7 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
 	if (!drm_kms_helper_is_poll_worker()) {
 		r = pm_runtime_get_sync(connector->dev->dev);
 		if (r < 0) {
-			pm_runtime_put_autosuspend(connector->dev->dev);
+			__pm_runtime_put_autosuspend(connector->dev->dev);
 			return connector_status_disconnected;
 		}
 	}
@@ -1726,7 +1726,7 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
 out:
 	if (!drm_kms_helper_is_poll_worker()) {
 		pm_runtime_mark_last_busy(connector->dev->dev);
-		pm_runtime_put_autosuspend(connector->dev->dev);
+		__pm_runtime_put_autosuspend(connector->dev->dev);
 	}
 
 	return ret;
drivers/gpu/drm/radeon/radeon_display.c +3 -3
index 8f5f8abcb1b4..3fe641bad5bc 100644
@@ -634,7 +634,7 @@ radeon_crtc_set_config(struct drm_mode_set *set,
 
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
@@ -656,12 +656,12 @@ radeon_crtc_set_config(struct drm_mode_set *set,
 	/* if we have no active crtcs, then drop the power ref
 	   we got before */
 	if (!active && rdev->have_disp_power_ref) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		rdev->have_disp_power_ref = false;
 	}
 
 	/* drop the power reference we got coming in here */
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
drivers/gpu/drm/radeon/radeon_drv.c +2 -2
index 900b05d8aa5c..ad4431a60508 100644
@@ -494,14 +494,14 @@ long radeon_drm_ioctl(struct file *filp,
 	dev = file_priv->minor->dev;
 	ret = pm_runtime_get_sync(dev->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return ret;
 	}
 
 	ret = drm_ioctl(filp, cmd, arg);
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return ret;
 }
 
drivers/gpu/drm/radeon/radeon_fbdev.c +2 -2
index 0aa20c8df546..a302cd3dc8a3 100644
@@ -156,7 +156,7 @@ static int radeon_fbdev_fb_open(struct fb_info *info, int user)
 
 err_pm_runtime_mark_last_busy:
 	pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
-	pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
+	__pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
 	return ret;
 }
 
@@ -166,7 +166,7 @@ static int radeon_fbdev_fb_release(struct fb_info *info, int user)
 	struct radeon_device *rdev = fb_helper->dev->dev_private;
 
 	pm_runtime_mark_last_busy(rdev_to_drm(rdev)->dev);
-	pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
+	__pm_runtime_put_autosuspend(rdev_to_drm(rdev)->dev);
 
 	return 0;
 }
drivers/gpu/drm/radeon/radeon_kms.c +5 -5
index 645e33bf7947..265912c96232 100644
@@ -171,7 +171,7 @@ int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags)
 		pm_runtime_set_active(dev->dev);
 		pm_runtime_allow(dev->dev);
 		pm_runtime_mark_last_busy(dev->dev);
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 	}
 
 out:
@@ -635,7 +635,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 
 	r = pm_runtime_get_sync(dev->dev);
 	if (r < 0) {
-		pm_runtime_put_autosuspend(dev->dev);
+		__pm_runtime_put_autosuspend(dev->dev);
 		return r;
 	}
 
@@ -678,7 +678,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 	}
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return 0;
 
 err_vm_fini:
@@ -688,7 +688,7 @@ int radeon_driver_open_kms(struct drm_device *dev, struct drm_file *file_priv)
 
 err_suspend:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 	return r;
 }
 
@@ -738,7 +738,7 @@ void radeon_driver_postclose_kms(struct drm_device *dev,
 		file_priv->driver_priv = NULL;
 	}
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 }
 
 /*
Signature · 1 line
2.39.5
author maintainer
#15 lore raw

PATCH 12/51 drm/panfrost: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/gpu/drm/panfrost/panfrost_job.c     | 4 ++--
 drivers/gpu/drm/panfrost/panfrost_mmu.c     | 4 ++--
 drivers/gpu/drm/panfrost/panfrost_perfcnt.c | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/gpu/drm/panfrost/panfrost_job.c +2 -2
index 9b8e82fb8bc4..c15ded70a4a3 100644
@@ -474,7 +474,7 @@ static void panfrost_job_handle_err(struct panfrost_device *pfdev,
 	if (signal_fence)
 		dma_fence_signal_locked(job->done_fence);
 
-	pm_runtime_put_autosuspend(pfdev->dev);
+	__pm_runtime_put_autosuspend(pfdev->dev);
 
 	if (panfrost_exception_needs_reset(pfdev, js_status)) {
 		atomic_set(&pfdev->reset.pending, 1);
@@ -493,7 +493,7 @@ static void panfrost_job_handle_done(struct panfrost_device *pfdev,
 	panfrost_devfreq_record_idle(&pfdev->pfdevfreq);
 
 	dma_fence_signal_locked(job->done_fence);
-	pm_runtime_put_autosuspend(pfdev->dev);
+	__pm_runtime_put_autosuspend(pfdev->dev);
 }
 
 static void panfrost_job_handle_irq(struct panfrost_device *pfdev, u32 status)
drivers/gpu/drm/panfrost/panfrost_mmu.c +2 -2
index b91019cd5acb..4c73abb65a1d 100644
@@ -284,7 +284,7 @@ static void panfrost_mmu_flush_range(struct panfrost_device *pfdev,
 	if (pm_runtime_active(pfdev->dev))
 		mmu_hw_do_operation(pfdev, mmu, iova, size, AS_COMMAND_FLUSH_PT);
 
-	pm_runtime_put_autosuspend(pfdev->dev);
+	__pm_runtime_put_autosuspend(pfdev->dev);
 }
 
 static int mmu_map_sg(struct panfrost_device *pfdev, struct panfrost_mmu *mmu,
@@ -562,7 +562,7 @@ static void panfrost_mmu_release_ctx(struct kref *kref)
 		pm_runtime_get_noresume(pfdev->dev);
 		if (pm_runtime_active(pfdev->dev))
 			panfrost_mmu_disable(pfdev, mmu->as);
-		pm_runtime_put_autosuspend(pfdev->dev);
+		__pm_runtime_put_autosuspend(pfdev->dev);
 
 		clear_bit(mmu->as, &pfdev->as_alloc_mask);
 		clear_bit(mmu->as, &pfdev->as_in_use_mask);
drivers/gpu/drm/panfrost/panfrost_perfcnt.c +2 -2
index ba9b6e2b2636..9d91cf537b2b 100644
@@ -202,7 +202,7 @@ static int panfrost_perfcnt_disable_locked(struct panfrost_device *pfdev,
 	panfrost_gem_mapping_put(perfcnt->mapping);
 	perfcnt->mapping = NULL;
 	pm_runtime_mark_last_busy(pfdev->dev);
-	pm_runtime_put_autosuspend(pfdev->dev);
+	__pm_runtime_put_autosuspend(pfdev->dev);
 
 	return 0;
 }
@@ -278,7 +278,7 @@ void panfrost_perfcnt_close(struct drm_file *file_priv)
 		panfrost_perfcnt_disable_locked(pfdev, file_priv);
 	mutex_unlock(&perfcnt->lock);
 	pm_runtime_mark_last_busy(pfdev->dev);
-	pm_runtime_put_autosuspend(pfdev->dev);
+	__pm_runtime_put_autosuspend(pfdev->dev);
 }
 
 int panfrost_perfcnt_init(struct panfrost_device *pfdev)
Signature · 1 line
2.39.5
author maintainer
#16 lore raw

PATCH 13/51 drivers: drm: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/gpu/drm/bridge/analogix/analogix_dp_core.c |  2 +-
 drivers/gpu/drm/bridge/analogix/anx7625.c          |  4 ++--
 drivers/gpu/drm/bridge/parade-ps8640.c             |  4 ++--
 drivers/gpu/drm/bridge/ti-sn65dsi86.c              | 14 +++++++-------
 drivers/gpu/drm/etnaviv/etnaviv_gpu.c              | 12 ++++++------
 drivers/gpu/drm/exynos/exynos_drm_fimc.c           |  4 ++--
 drivers/gpu/drm/exynos/exynos_drm_g2d.c            |  4 ++--
 drivers/gpu/drm/exynos/exynos_drm_gsc.c            |  6 +++---
 drivers/gpu/drm/exynos/exynos_drm_rotator.c        |  2 +-
 drivers/gpu/drm/exynos/exynos_drm_scaler.c         |  2 +-
 drivers/gpu/drm/i915/intel_runtime_pm.c            |  4 ++--
 drivers/gpu/drm/imx/dcss/dcss-crtc.c               |  2 +-
 drivers/gpu/drm/lima/lima_sched.c                  |  2 +-
 drivers/gpu/drm/msm/adreno/adreno_device.c         |  2 +-
 drivers/gpu/drm/msm/adreno/adreno_gpu.c            |  2 +-
 drivers/gpu/drm/msm/msm_gpu.c                      |  2 +-
 drivers/gpu/drm/msm/msm_iommu.c                    |  4 ++--
 drivers/gpu/drm/msm/msm_submitqueue.c              |  2 +-
 drivers/gpu/drm/panel/panel-edp.c                  |  8 ++++----
 drivers/gpu/drm/panel/panel-samsung-atna33xc20.c   |  6 +++---
 drivers/gpu/drm/panel/panel-simple.c               |  6 +++---
 drivers/gpu/drm/panthor/panthor_device.c           |  2 +-
 drivers/gpu/drm/panthor/panthor_sched.c            |  6 +++---
 drivers/gpu/drm/tegra/submit.c                     |  2 +-
 drivers/gpu/drm/tidss/tidss_drv.c                  |  2 +-
 drivers/gpu/drm/vc4/vc4_v3d.c                      |  2 +-
 26 files changed, 54 insertions(+), 54 deletions(-)
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +1 -1
index bfa88409a7ff..42681a76ee67 100644
@@ -1543,7 +1543,7 @@ static ssize_t analogix_dpaux_transfer(struct drm_dp_aux *aux,
 	ret = analogix_dp_transfer(dp, msg);
 out:
 	pm_runtime_mark_last_busy(dp->dev);
-	pm_runtime_put_autosuspend(dp->dev);
+	__pm_runtime_put_autosuspend(dp->dev);
 
 	return ret;
 }
drivers/gpu/drm/bridge/analogix/anx7625.c +2 -2
index a2675b121fe4..f7dd55407ea9 100644
@@ -1521,7 +1521,7 @@ static int anx7625_wait_hpd_asserted(struct drm_dp_aux *aux,
 	pm_runtime_get_sync(dev);
 	ret = _anx7625_hpd_polling(ctx, wait_us);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1771,7 +1771,7 @@ static ssize_t anx7625_aux_transfer(struct drm_dp_aux *aux,
 		ret = anx7625_aux_trans(ctx, msg->request, msg->address,
 					msg->size, msg->buffer);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	mutex_unlock(&ctx->aux_lock);
 
 	return ret;
drivers/gpu/drm/bridge/parade-ps8640.c +2 -2
index 14d4dcf239da..a0faf4bd8866 100644
@@ -200,7 +200,7 @@ static int ps8640_wait_hpd_asserted(struct drm_dp_aux *aux, unsigned long wait_u
 	pm_runtime_get_sync(dev);
 	ret = _ps8640_wait_hpd_asserted(ps_bridge, wait_us);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -355,7 +355,7 @@ static ssize_t ps8640_aux_transfer(struct drm_dp_aux *aux,
 	}
 	ret = ps8640_aux_transfer_msg(aux, msg);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 exit:
 	mutex_unlock(&ps_bridge->aux_lock);
drivers/gpu/drm/bridge/ti-sn65dsi86.c +7 -7
index 9e31f750fd88..06e9e538f351 100644
@@ -420,7 +420,7 @@ static int status_show(struct seq_file *s, void *data)
 		seq_printf(s, "[0x%02x] = 0x%08x\n", reg, val);
 	}
 
-	pm_runtime_put_autosuspend(pdata->dev);
+	__pm_runtime_put_autosuspend(pdata->dev);
 
 	return 0;
 }
@@ -626,7 +626,7 @@ static ssize_t ti_sn_aux_transfer(struct drm_dp_aux *aux,
 exit:
 	mutex_unlock(&pdata->comms_mutex);
 	pm_runtime_mark_last_busy(pdata->dev);
-	pm_runtime_put_autosuspend(pdata->dev);
+	__pm_runtime_put_autosuspend(pdata->dev);
 
 	if (ret)
 		return ret;
@@ -721,7 +721,7 @@ static int ti_sn_attach_host(struct auxiliary_device *adev, struct ti_sn65dsi86
 	/* check if continuous dsi clock is required or not */
 	pm_runtime_get_sync(dev);
 	regmap_read(pdata->regmap, SN_DPPLL_SRC_REG, &val);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	if (!(val & DPPLL_CLK_SRC_DSICLK))
 		dsi->mode_flags |= MIPI_DSI_CLOCK_NON_CONTINUOUS;
 
@@ -1201,7 +1201,7 @@ static enum drm_connector_status ti_sn_bridge_detect(struct drm_bridge *bridge)
 
 	pm_runtime_get_sync(pdata->dev);
 	regmap_read(pdata->regmap, SN_HPD_DISABLE_REG, &val);
-	pm_runtime_put_autosuspend(pdata->dev);
+	__pm_runtime_put_autosuspend(pdata->dev);
 
 	return val & HPD_DEBOUNCED_STATE ? connector_status_connected
 					 : connector_status_disconnected;
@@ -1694,7 +1694,7 @@ static int ti_sn_bridge_gpio_get(struct gpio_chip *chip, unsigned int offset)
 	 */
 	pm_runtime_get_sync(pdata->dev);
 	ret = regmap_read(pdata->regmap, SN_GPIO_IO_REG, &val);
-	pm_runtime_put_autosuspend(pdata->dev);
+	__pm_runtime_put_autosuspend(pdata->dev);
 
 	if (ret)
 		return ret;
@@ -1745,7 +1745,7 @@ static int ti_sn_bridge_gpio_direction_input(struct gpio_chip *chip,
 	 * it off and when it comes back it will have lost all state, but
 	 * that's OK because the default is input and we're now an input.
 	 */
-	pm_runtime_put_autosuspend(pdata->dev);
+	__pm_runtime_put_autosuspend(pdata->dev);
 
 	return 0;
 }
@@ -1771,7 +1771,7 @@ static int ti_sn_bridge_gpio_direction_output(struct gpio_chip *chip,
 				 SN_GPIO_MUX_OUTPUT << shift);
 	if (ret) {
 		clear_bit(offset, pdata->gchip_output);
-		pm_runtime_put_autosuspend(pdata->dev);
+		__pm_runtime_put_autosuspend(pdata->dev);
 	}
 
 	return ret;
drivers/gpu/drm/etnaviv/etnaviv_gpu.c +6 -6
index 7c7f97793ddd..ffcf76af9585 100644
@@ -896,14 +896,14 @@ int etnaviv_gpu_init(struct etnaviv_gpu *gpu)
 	mutex_unlock(&gpu->lock);
 
 	pm_runtime_mark_last_busy(gpu->dev);
-	pm_runtime_put_autosuspend(gpu->dev);
+	__pm_runtime_put_autosuspend(gpu->dev);
 
 	return 0;
 
 fail:
 	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
-	pm_runtime_put_autosuspend(gpu->dev);
+	__pm_runtime_put_autosuspend(gpu->dev);
 
 	return ret;
 }
@@ -1090,7 +1090,7 @@ int etnaviv_gpu_debugfs(struct etnaviv_gpu *gpu, struct seq_file *m)
 
 	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
-	pm_runtime_put_autosuspend(gpu->dev);
+	__pm_runtime_put_autosuspend(gpu->dev);
 
 	return ret;
 }
@@ -1217,7 +1217,7 @@ static int event_alloc(struct etnaviv_gpu *gpu, unsigned nr_events,
 
 out_rpm:
 	for (i = 0; i < rpm_count; i++)
-		pm_runtime_put_autosuspend(gpu->dev);
+		__pm_runtime_put_autosuspend(gpu->dev);
 out:
 	for (i = 0; i < acquired; i++)
 		complete(&gpu->event_free);
@@ -1235,7 +1235,7 @@ static void event_free(struct etnaviv_gpu *gpu, unsigned int event)
 		complete(&gpu->event_free);
 	}
 
-	pm_runtime_put_autosuspend(gpu->dev);
+	__pm_runtime_put_autosuspend(gpu->dev);
 }
 
 /*
@@ -1492,7 +1492,7 @@ void etnaviv_gpu_recover_hang(struct etnaviv_gem_submit *submit)
 	mutex_unlock(&gpu->lock);
 	pm_runtime_mark_last_busy(gpu->dev);
 pm_put:
-	pm_runtime_put_autosuspend(gpu->dev);
+	__pm_runtime_put_autosuspend(gpu->dev);
 }
 
 static void dump_mmu_fault(struct etnaviv_gpu *gpu)
drivers/gpu/drm/exynos/exynos_drm_fimc.c +2 -2
index 4d7ea65b7dd8..4ad9c39b52aa 100644
@@ -968,7 +968,7 @@ static irqreturn_t fimc_irq_handler(int irq, void *dev_id)
 
 		ctx->task = NULL;
 		pm_runtime_mark_last_busy(ctx->dev);
-		pm_runtime_put_autosuspend(ctx->dev);
+		__pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, 0);
 	}
 
@@ -1120,7 +1120,7 @@ static void fimc_abort(struct exynos_drm_ipp *ipp,
 
 		ctx->task = NULL;
 		pm_runtime_mark_last_busy(ctx->dev);
-		pm_runtime_put_autosuspend(ctx->dev);
+		__pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, -EIO);
 	}
 }
drivers/gpu/drm/exynos/exynos_drm_g2d.c +2 -2
index 3a3b2c00e400..cb315077d5f3 100644
@@ -882,7 +882,7 @@ static void g2d_runqueue_worker(struct work_struct *work)
 
 	if (runqueue_node) {
 		pm_runtime_mark_last_busy(g2d->dev);
-		pm_runtime_put_autosuspend(g2d->dev);
+		__pm_runtime_put_autosuspend(g2d->dev);
 
 		complete(&runqueue_node->complete);
 		if (runqueue_node->async)
@@ -1010,7 +1010,7 @@ static void g2d_wait_finish(struct g2d_data *g2d, struct drm_file *file)
 	 * So do this manually here.
 	 */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	complete(&runqueue_node->complete);
 	if (runqueue_node->async)
drivers/gpu/drm/exynos/exynos_drm_gsc.c +3 -3
index 59fa22050717..0a85e746e3f8 100644
@@ -1054,7 +1054,7 @@ static irqreturn_t gsc_irq_handler(int irq, void *dev_id)
 
 		ctx->task = NULL;
 		pm_runtime_mark_last_busy(ctx->dev);
-		pm_runtime_put_autosuspend(ctx->dev);
+		__pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, err);
 	}
 
@@ -1127,7 +1127,7 @@ static int gsc_commit(struct exynos_drm_ipp *ipp,
 
 	ret = gsc_reset(ctx);
 	if (ret) {
-		pm_runtime_put_autosuspend(ctx->dev);
+		__pm_runtime_put_autosuspend(ctx->dev);
 		ctx->task = NULL;
 		return ret;
 	}
@@ -1157,7 +1157,7 @@ static void gsc_abort(struct exynos_drm_ipp *ipp,
 
 		ctx->task = NULL;
 		pm_runtime_mark_last_busy(ctx->dev);
-		pm_runtime_put_autosuspend(ctx->dev);
+		__pm_runtime_put_autosuspend(ctx->dev);
 		exynos_drm_ipp_task_done(task, -EIO);
 	}
 }
drivers/gpu/drm/exynos/exynos_drm_rotator.c +1 -1
index 2eb0b701672f..252555003a74 100644
@@ -108,7 +108,7 @@ static irqreturn_t rotator_irq_handler(int irq, void *arg)
 
 		rot->task = NULL;
 		pm_runtime_mark_last_busy(rot->dev);
-		pm_runtime_put_autosuspend(rot->dev);
+		__pm_runtime_put_autosuspend(rot->dev);
 		exynos_drm_ipp_task_done(task,
 			irq_status == ROT_IRQ_STATUS_COMPLETE ? 0 : -EINVAL);
 	}
drivers/gpu/drm/exynos/exynos_drm_scaler.c +1 -1
index 2788105ac780..0be5eaf1335e 100644
@@ -439,7 +439,7 @@ static irqreturn_t scaler_irq_handler(int irq, void *arg)
 
 		scaler->task = NULL;
 		pm_runtime_mark_last_busy(scaler->dev);
-		pm_runtime_put_autosuspend(scaler->dev);
+		__pm_runtime_put_autosuspend(scaler->dev);
 		exynos_drm_ipp_task_done(task, scaler_task_done(val));
 	}
 
drivers/gpu/drm/i915/intel_runtime_pm.c +2 -2
index a21f5a1c89bc..bceb94f8d2f8 100644
@@ -304,7 +304,7 @@ static void __intel_runtime_pm_put(struct intel_runtime_pm *rpm,
 	intel_runtime_pm_release(rpm, wakelock);
 
 	pm_runtime_mark_last_busy(kdev);
-	pm_runtime_put_autosuspend(kdev);
+	__pm_runtime_put_autosuspend(kdev);
 }
 
 /**
@@ -415,7 +415,7 @@ void intel_runtime_pm_enable(struct intel_runtime_pm *rpm)
 	 * We drop that here and will reacquire it during unloading in
 	 * intel_power_domains_fini().
 	 */
-	pm_runtime_put_autosuspend(kdev);
+	__pm_runtime_put_autosuspend(kdev);
 }
 
 void intel_runtime_pm_disable(struct intel_runtime_pm *rpm)
drivers/gpu/drm/imx/dcss/dcss-crtc.c +1 -1
index af91e45b5d13..48a4becb92e9 100644
@@ -155,7 +155,7 @@ static void dcss_crtc_atomic_disable(struct drm_crtc *crtc,
 	drm_crtc_vblank_off(crtc);
 
 	pm_runtime_mark_last_busy(dcss->dev);
-	pm_runtime_put_autosuspend(dcss->dev);
+	__pm_runtime_put_autosuspend(dcss->dev);
 }
 
 static const struct drm_crtc_helper_funcs dcss_helper_funcs = {
drivers/gpu/drm/lima/lima_sched.c +1 -1
index b40c90e97d7e..c7e6e995c01b 100644
@@ -196,7 +196,7 @@ static void lima_pm_idle(struct lima_device *ldev)
 
 	/* GPU can do auto runtime suspend */
 	pm_runtime_mark_last_busy(ldev->dev);
-	pm_runtime_put_autosuspend(ldev->dev);
+	__pm_runtime_put_autosuspend(ldev->dev);
 }
 
 static struct dma_fence *lima_sched_run_job(struct drm_sched_job *job)
drivers/gpu/drm/msm/adreno/adreno_device.c +1 -1
index cfc74a9e2646..8fc0c9ca14bd 100644
@@ -110,7 +110,7 @@ struct msm_gpu *adreno_load_gpu(struct drm_device *dev)
 		goto err_put_rpm;
 	}
 
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 #ifdef CONFIG_DEBUG_FS
 	if (gpu->funcs->debugfs_init) {
drivers/gpu/drm/msm/adreno/adreno_gpu.c +1 -1
index 465a4cd14a43..fbe38f5c1ec8 100644
@@ -343,7 +343,7 @@ int adreno_get_param(struct msm_gpu *gpu, struct msm_file_private *ctx,
 
 			pm_runtime_get_sync(&gpu->pdev->dev);
 			ret = adreno_gpu->funcs->get_timestamp(gpu, value);
-			pm_runtime_put_autosuspend(&gpu->pdev->dev);
+			__pm_runtime_put_autosuspend(&gpu->pdev->dev);
 
 			return ret;
 		}
drivers/gpu/drm/msm/msm_gpu.c +1 -1
index a274b8466423..8fcfa7e65848 100644
@@ -687,7 +687,7 @@ static void retire_submit(struct msm_gpu *gpu, struct msm_ringbuffer *ring,
 	WARN_ON(gpu->active_submits < 0);
 	if (!gpu->active_submits) {
 		msm_devfreq_idle(gpu);
-		pm_runtime_put_autosuspend(&gpu->pdev->dev);
+		__pm_runtime_put_autosuspend(&gpu->pdev->dev);
 	}
 
 	mutex_unlock(&gpu->active_lock);
drivers/gpu/drm/msm/msm_iommu.c +2 -2
index 2a94e82316f9..ea478ab9fdbd 100644
@@ -213,7 +213,7 @@ static void msm_iommu_tlb_flush_all(void *cookie)
 
 	pagetable->tlb->tlb_flush_all((void *)adreno_smmu->cookie);
 
-	pm_runtime_put_autosuspend(pagetable->iommu_dev);
+	__pm_runtime_put_autosuspend(pagetable->iommu_dev);
 }
 
 static void msm_iommu_tlb_flush_walk(unsigned long iova, size_t size,
@@ -229,7 +229,7 @@ static void msm_iommu_tlb_flush_walk(unsigned long iova, size_t size,
 
 	pagetable->tlb->tlb_flush_walk(iova, size, granule, (void *)adreno_smmu->cookie);
 
-	pm_runtime_put_autosuspend(pagetable->iommu_dev);
+	__pm_runtime_put_autosuspend(pagetable->iommu_dev);
 }
 
 static void msm_iommu_tlb_add_page(struct iommu_iotlb_gather *gather,
drivers/gpu/drm/msm/msm_submitqueue.c +1 -1
index 0e803125a325..4c003c884184 100644
@@ -32,7 +32,7 @@ int msm_file_private_set_sysprof(struct msm_file_private *ctx,
 	/* unwind old value: */
 	switch (ctx->sysprof) {
 	case 2:
-		pm_runtime_put_autosuspend(&gpu->pdev->dev);
+		__pm_runtime_put_autosuspend(&gpu->pdev->dev);
 		fallthrough;
 	case 1:
 		refcount_dec(&gpu->sysprof_active);
drivers/gpu/drm/panel/panel-edp.c +4 -4
index 767e47a2b0c1..0d3b9b9e410d 100644
@@ -532,7 +532,7 @@ static int panel_edp_prepare(struct drm_panel *panel)
 
 	ret = pm_runtime_get_sync(panel->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(panel->dev);
+		__pm_runtime_put_autosuspend(panel->dev);
 		return ret;
 	}
 
@@ -614,7 +614,7 @@ static int panel_edp_get_modes(struct drm_panel *panel,
 		}
 
 		pm_runtime_mark_last_busy(panel->dev);
-		pm_runtime_put_autosuspend(panel->dev);
+		__pm_runtime_put_autosuspend(panel->dev);
 	}
 
 	if (has_hard_coded_modes)
@@ -826,7 +826,7 @@ static int generic_edp_panel_probe(struct device *dev, struct panel_edp *panel)
 
 exit:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -919,7 +919,7 @@ static int panel_edp_probe(struct device *dev, const struct panel_desc *desc,
 		pm_runtime_get_sync(dev);
 		err = drm_panel_dp_aux_backlight(&panel->base, panel->aux);
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 
 		/*
 		 * Warn if we get an error, but don't consider it fatal. Having
drivers/gpu/drm/panel/panel-samsung-atna33xc20.c +3 -3
index 9a482a744b8c..65e7400adec1 100644
@@ -213,7 +213,7 @@ static int atana33xc20_prepare(struct drm_panel *panel)
 
 	ret = pm_runtime_get_sync(panel->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(panel->dev);
+		__pm_runtime_put_autosuspend(panel->dev);
 		return ret;
 	}
 
@@ -237,7 +237,7 @@ static int atana33xc20_get_modes(struct drm_panel *panel,
 	num = drm_edid_connector_add_modes(connector);
 
 	pm_runtime_mark_last_busy(panel->dev);
-	pm_runtime_put_autosuspend(panel->dev);
+	__pm_runtime_put_autosuspend(panel->dev);
 
 	return num;
 }
@@ -306,7 +306,7 @@ static int atana33xc20_probe(struct dp_aux_ep_device *aux_ep)
 	pm_runtime_get_sync(dev);
 	ret = drm_panel_dp_aux_backlight(&panel->base, aux_ep->aux);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	/*
 	 * Warn if we get an error, but don't consider it fatal. Having
drivers/gpu/drm/panel/panel-simple.c +3 -3
index 86735430462f..b79bab689dae 100644
@@ -312,7 +312,7 @@ static int panel_simple_unprepare(struct drm_panel *panel)
 	int ret;
 
 	pm_runtime_mark_last_busy(panel->dev);
-	ret = pm_runtime_put_autosuspend(panel->dev);
+	ret = __pm_runtime_put_autosuspend(panel->dev);
 	if (ret < 0)
 		return ret;
 
@@ -346,7 +346,7 @@ static int panel_simple_prepare(struct drm_panel *panel)
 
 	ret = pm_runtime_get_sync(panel->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(panel->dev);
+		__pm_runtime_put_autosuspend(panel->dev);
 		return ret;
 	}
 
@@ -381,7 +381,7 @@ static int panel_simple_get_modes(struct drm_panel *panel,
 		num += drm_edid_connector_add_modes(connector);
 
 		pm_runtime_mark_last_busy(panel->dev);
-		pm_runtime_put_autosuspend(panel->dev);
+		__pm_runtime_put_autosuspend(panel->dev);
 	}
 
 	/* add hard-coded panel modes */
drivers/gpu/drm/panthor/panthor_device.c +1 -1
index 4082c8f2951d..7cf237f21ae1 100644
@@ -250,7 +250,7 @@ int panthor_device_init(struct panthor_device *ptdev)
 	if (ret)
 		goto err_disable_autosuspend;
 
-	pm_runtime_put_autosuspend(ptdev->base.dev);
+	__pm_runtime_put_autosuspend(ptdev->base.dev);
 	return 0;
 
 err_disable_autosuspend:
drivers/gpu/drm/panthor/panthor_sched.c +3 -3
index eb9f6635cc12..9d342d660b71 100644
@@ -2412,7 +2412,7 @@ static void tick_work(struct work_struct *work)
 	if (ctx.idle_group_count == ctx.group_count) {
 		panthor_devfreq_record_idle(sched->ptdev);
 		if (sched->pm.has_ref) {
-			pm_runtime_put_autosuspend(ptdev->base.dev);
+			__pm_runtime_put_autosuspend(ptdev->base.dev);
 			sched->pm.has_ref = false;
 		}
 	} else {
@@ -2437,7 +2437,7 @@ static void tick_work(struct work_struct *work)
 out_unlock:
 	mutex_unlock(&sched->lock);
 	pm_runtime_mark_last_busy(ptdev->base.dev);
-	pm_runtime_put_autosuspend(ptdev->base.dev);
+	__pm_runtime_put_autosuspend(ptdev->base.dev);
 
 out_dev_exit:
 	drm_dev_exit(cookie);
@@ -3181,7 +3181,7 @@ queue_run_job(struct drm_sched_job *sched_job)
 out_unlock:
 	mutex_unlock(&sched->lock);
 	pm_runtime_mark_last_busy(ptdev->base.dev);
-	pm_runtime_put_autosuspend(ptdev->base.dev);
+	__pm_runtime_put_autosuspend(ptdev->base.dev);
 
 	return done_fence;
 }
drivers/gpu/drm/tegra/submit.c +1 -1
index 2430fcc97448..d9e8ec2f7a6c 100644
@@ -503,7 +503,7 @@ static void release_job(struct host1x_job *job)
 	kfree(job_data);
 
 	pm_runtime_mark_last_busy(client->base.dev);
-	pm_runtime_put_autosuspend(client->base.dev);
+	__pm_runtime_put_autosuspend(client->base.dev);
 }
 
 int tegra_drm_ioctl_channel_submit(struct drm_device *drm, void *data,
drivers/gpu/drm/tidss/tidss_drv.c +1 -1
index 2428b9aaa003..95060073cc5c 100644
@@ -46,7 +46,7 @@ void tidss_runtime_put(struct tidss_device *tidss)
 
 	pm_runtime_mark_last_busy(tidss->dev);
 
-	r = pm_runtime_put_autosuspend(tidss->dev);
+	r = __pm_runtime_put_autosuspend(tidss->dev);
 	WARN_ON(r < 0);
 }
 
drivers/gpu/drm/vc4/vc4_v3d.c +1 -1
index 2423826c89eb..8a21a3a834e3 100644
@@ -154,7 +154,7 @@ vc4_v3d_pm_put(struct vc4_dev *vc4)
 	mutex_lock(&vc4->power_lock);
 	if (--vc4->power_refcount == 0) {
 		pm_runtime_mark_last_busy(&vc4->v3d->pdev->dev);
-		pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
+		__pm_runtime_put_autosuspend(&vc4->v3d->pdev->dev);
 	}
 	mutex_unlock(&vc4->power_lock);
 }
Signature · 1 line
2.39.5
author maintainer
#17 lore raw

PATCH 14/51 HSI: omap_ssi_port: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/hsi/controllers/omap_ssi_port.c | 42 ++++++++++++-------------
 1 file changed, 21 insertions(+), 21 deletions(-)
drivers/hsi/controllers/omap_ssi_port.c +21 -21
index f0b3eca7376e..893702eeaa86 100644
@@ -114,7 +114,7 @@ static int ssi_port_regs_show(struct seq_file *m, void *p __maybe_unused)
 		seq_printf(m, "BUFFER_CH%d\t: 0x%08x\n", ch,
 				readl(base + SSI_SSR_BUFFER_CH_REG(ch)));
 	}
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return 0;
 }
@@ -128,7 +128,7 @@ static int ssi_div_get(void *data, u64 *val)
 
 	pm_runtime_get_sync(omap_port->pdev);
 	*val = readl(omap_port->sst_base + SSI_SST_DIVISOR_REG);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return 0;
 }
@@ -144,7 +144,7 @@ static int ssi_div_set(void *data, u64 val)
 	pm_runtime_get_sync(omap_port->pdev);
 	writel(val, omap_port->sst_base + SSI_SST_DIVISOR_REG);
 	omap_port->sst.divisor = val;
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return 0;
 }
@@ -217,7 +217,7 @@ static int ssi_start_dma(struct hsi_msg *msg, int lch)
 
 	if (!pm_runtime_active(omap_port->pdev)) {
 		dev_warn(&port->device, "ssi_start_dma called without runtime PM!\n");
-		pm_runtime_put_autosuspend(omap_port->pdev);
+		__pm_runtime_put_autosuspend(omap_port->pdev);
 		return -EREMOTEIO;
 	}
 
@@ -226,7 +226,7 @@ static int ssi_start_dma(struct hsi_msg *msg, int lch)
 							DMA_FROM_DEVICE);
 		if (!err) {
 			dev_dbg(&ssi->device, "DMA map SG failed !\n");
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 			return -EIO;
 		}
 		csdp = SSI_DST_BURST_4x32_BIT | SSI_DST_MEMORY_PORT |
@@ -243,7 +243,7 @@ static int ssi_start_dma(struct hsi_msg *msg, int lch)
 							DMA_TO_DEVICE);
 		if (!err) {
 			dev_dbg(&ssi->device, "DMA map SG failed !\n");
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 			return -EIO;
 		}
 		csdp = SSI_SRC_BURST_4x32_BIT | SSI_SRC_MEMORY_PORT |
@@ -289,7 +289,7 @@ static int ssi_start_pio(struct hsi_msg *msg)
 
 	if (!pm_runtime_active(omap_port->pdev)) {
 		dev_warn(&port->device, "ssi_start_pio called without runtime PM!\n");
-		pm_runtime_put_autosuspend(omap_port->pdev);
+		__pm_runtime_put_autosuspend(omap_port->pdev);
 		return -EREMOTEIO;
 	}
 
@@ -304,7 +304,7 @@ static int ssi_start_pio(struct hsi_msg *msg)
 						msg->ttype ? "write" : "read");
 	val |= readl(omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0));
 	writel(val, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0));
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 	msg->actual_len = 0;
 	msg->status = HSI_STATUS_PROCEEDING;
 
@@ -363,7 +363,7 @@ static int ssi_async_break(struct hsi_msg *msg)
 	}
 out:
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return err;
 }
@@ -402,7 +402,7 @@ static int ssi_async(struct hsi_msg *msg)
 	}
 	spin_unlock_bh(&omap_port->lock);
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 	dev_dbg(&port->device, "msg status %d ttype %d ch %d\n",
 				msg->status, msg->ttype, msg->channel);
 
@@ -505,7 +505,7 @@ static int ssi_setup(struct hsi_client *cl)
 out:
 	spin_unlock_bh(&omap_port->lock);
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return err;
 }
@@ -536,7 +536,7 @@ static int ssi_flush(struct hsi_client *cl)
 			continue;
 		writew_relaxed(0, omap_ssi->gdd + SSI_GDD_CCR_REG(i));
 		if (msg->ttype == HSI_MSG_READ)
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 		omap_ssi->gdd_trn[i].msg = NULL;
 	}
 	/* Flush all SST buffers */
@@ -560,7 +560,7 @@ static int ssi_flush(struct hsi_client *cl)
 	for (i = 0; i < omap_port->channels; i++) {
 		/* Release write clocks */
 		if (!list_empty(&omap_port->txqueue[i]))
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 		ssi_flush_queue(&omap_port->txqueue[i], NULL);
 		ssi_flush_queue(&omap_port->rxqueue[i], NULL);
 	}
@@ -571,7 +571,7 @@ static int ssi_flush(struct hsi_client *cl)
 
 	spin_unlock_bh(&omap_port->lock);
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return 0;
 }
@@ -626,7 +626,7 @@ static int ssi_stop_tx(struct hsi_client *cl)
 	spin_unlock_bh(&omap_port->wk_lock);
 
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev); /* Release clocks */
+	__pm_runtime_put_autosuspend(omap_port->pdev); /* Release clocks */
 
 
 	return 0;
@@ -654,7 +654,7 @@ static void ssi_transfer(struct omap_ssi_port *omap_port,
 	}
 	spin_unlock_bh(&omap_port->lock);
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 }
 
 static void ssi_cleanup_queues(struct hsi_client *cl)
@@ -684,7 +684,7 @@ static void ssi_cleanup_queues(struct hsi_client *cl)
 			status |= SSI_DATAACCEPT(i);
 			/* Release the clocks writes, also GDD ones */
 			pm_runtime_mark_last_busy(omap_port->pdev);
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 		ssi_flush_queue(&omap_port->txqueue[i], cl);
 	}
@@ -740,7 +740,7 @@ static void ssi_cleanup_gdd(struct hsi_controller *ssi, struct hsi_client *cl)
 		 */
 		if (msg->ttype == HSI_MSG_READ) {
 			pm_runtime_mark_last_busy(omap_port->pdev);
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 		omap_ssi->gdd_trn[i].msg = NULL;
 	}
@@ -937,7 +937,7 @@ static void ssi_pio_complete(struct hsi_port *port, struct list_head *queue)
 	if (msg->ttype == HSI_MSG_WRITE) {
 		/* Release clocks for write transfer */
 		pm_runtime_mark_last_busy(omap_port->pdev);
-		pm_runtime_put_autosuspend(omap_port->pdev);
+		__pm_runtime_put_autosuspend(omap_port->pdev);
 	}
 	reg &= ~val;
 	writel_relaxed(reg, omap_ssi->sys + SSI_MPU_ENABLE_REG(port->num, 0));
@@ -982,7 +982,7 @@ static irqreturn_t ssi_pio_thread(int irq, void *ssi_port)
 	} while (status_reg);
 
 	pm_runtime_mark_last_busy(omap_port->pdev);
-	pm_runtime_put_autosuspend(omap_port->pdev);
+	__pm_runtime_put_autosuspend(omap_port->pdev);
 
 	return IRQ_HANDLED;
 }
@@ -1019,7 +1019,7 @@ static irqreturn_t ssi_wake_thread(int irq __maybe_unused, void *ssi_port)
 		hsi_event(port, HSI_EVENT_STOP_RX);
 		if (test_and_clear_bit(SSI_WAKE_EN, &omap_port->flags)) {
 			pm_runtime_mark_last_busy(omap_port->pdev);
-			pm_runtime_put_autosuspend(omap_port->pdev);
+			__pm_runtime_put_autosuspend(omap_port->pdev);
 		}
 	}
 
Signature · 1 line
2.39.5
author maintainer
#18 lore raw

PATCH 15/51 stm class: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/hwtracing/stm/core.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/hwtracing/stm/core.c +4 -4
index cdba4e875b28..229546270bf4 100644
@@ -660,7 +660,7 @@ static ssize_t stm_char_write(struct file *file, const char __user *buf,
 	count = stm_write(stm, &stmf->output, 0, kbuf, count, NULL);
 
 	pm_runtime_mark_last_busy(&stm->dev);
-	pm_runtime_put_autosuspend(&stm->dev);
+	__pm_runtime_put_autosuspend(&stm->dev);
 	kfree(kbuf);
 
 	return count;
@@ -680,7 +680,7 @@ static void stm_mmap_close(struct vm_area_struct *vma)
 	struct stm_device *stm = stmf->stm;
 
 	pm_runtime_mark_last_busy(&stm->dev);
-	pm_runtime_put_autosuspend(&stm->dev);
+	__pm_runtime_put_autosuspend(&stm->dev);
 }
 
 static const struct vm_operations_struct stm_mmap_vmops = {
@@ -1083,7 +1083,7 @@ static int __stm_source_link_drop(struct stm_source_device *src,
 	stm_output_free(link, &src->output);
 	list_del_init(&src->link_entry);
 	pm_runtime_mark_last_busy(&link->dev);
-	pm_runtime_put_autosuspend(&link->dev);
+	__pm_runtime_put_autosuspend(&link->dev);
 	/* matches stm_find_device() from stm_source_link_store() */
 	stm_put_device(link);
 	rcu_assign_pointer(src->link, NULL);
@@ -1181,7 +1181,7 @@ static ssize_t stm_source_link_store(struct device *dev,
 
 	err = stm_source_link_add(src, link);
 	if (err) {
-		pm_runtime_put_autosuspend(&link->dev);
+		__pm_runtime_put_autosuspend(&link->dev);
 		/* matches the stm_find_device() above */
 		stm_put_device(link);
 	}
Signature · 1 line
2.39.5
maintainer Acked-by on v1 15/51
#19 lore raw

Re: [PATCH 15/51] stm class: Switch to __pm_runtime_put_autosuspend()

Quoted 4 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

Hi Sakari,

Or do you want me to pick it up into my queue instead?

Regards,
--
Alex

author maintainer
#20 lore raw

PATCH 16/51 i2c: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/i2c/busses/i2c-amd-mp2-pci.c       |  2 +-
 drivers/i2c/busses/i2c-amd-mp2.h           |  2 +-
 drivers/i2c/busses/i2c-at91-master.c       |  2 +-
 drivers/i2c/busses/i2c-cadence.c           |  2 +-
 drivers/i2c/busses/i2c-davinci.c           |  4 ++--
 drivers/i2c/busses/i2c-designware-master.c |  2 +-
 drivers/i2c/busses/i2c-designware-pcidrv.c |  2 +-
 drivers/i2c/busses/i2c-hix5hd2.c           |  2 +-
 drivers/i2c/busses/i2c-i801.c              |  4 ++--
 drivers/i2c/busses/i2c-img-scb.c           |  6 +++---
 drivers/i2c/busses/i2c-imx-lpi2c.c         |  6 +++---
 drivers/i2c/busses/i2c-imx.c               |  4 ++--
 drivers/i2c/busses/i2c-mv64xxx.c           |  2 +-
 drivers/i2c/busses/i2c-nvidia-gpu.c        |  4 ++--
 drivers/i2c/busses/i2c-omap.c              |  6 +++---
 drivers/i2c/busses/i2c-qcom-cci.c          |  2 +-
 drivers/i2c/busses/i2c-qcom-geni.c         |  2 +-
 drivers/i2c/busses/i2c-qup.c               |  4 ++--
 drivers/i2c/busses/i2c-riic.c              |  4 ++--
 drivers/i2c/busses/i2c-rzv2m.c             |  2 +-
 drivers/i2c/busses/i2c-sprd.c              |  4 ++--
 drivers/i2c/busses/i2c-stm32f7.c           | 10 +++++-----
 drivers/i2c/busses/i2c-xiic.c              |  2 +-
 23 files changed, 40 insertions(+), 40 deletions(-)
drivers/i2c/busses/i2c-amd-mp2-pci.c +1 -1
index 143165300949..43efef70607b 100644
@@ -360,7 +360,7 @@ static int amd_mp2_pci_probe(struct pci_dev *pci_dev,
 
 	pm_runtime_set_autosuspend_delay(&pci_dev->dev, 1000);
 	pm_runtime_use_autosuspend(&pci_dev->dev);
-	pm_runtime_put_autosuspend(&pci_dev->dev);
+	__pm_runtime_put_autosuspend(&pci_dev->dev);
 	pm_runtime_allow(&pci_dev->dev);
 
 	privdata->probed = true;
drivers/i2c/busses/i2c-amd-mp2.h +1 -1
index 018a42de8b1e..66736440a1af 100644
@@ -208,7 +208,7 @@ static inline void amd_mp2_pm_runtime_get(struct amd_mp2_dev *mp2_dev)
 static inline void amd_mp2_pm_runtime_put(struct amd_mp2_dev *mp2_dev)
 {
 	pm_runtime_mark_last_busy(&mp2_dev->pci_dev->dev);
-	pm_runtime_put_autosuspend(&mp2_dev->pci_dev->dev);
+	__pm_runtime_put_autosuspend(&mp2_dev->pci_dev->dev);
 }
 
 #endif
drivers/i2c/busses/i2c-at91-master.c +1 -1
index ee3b469ddfb9..ef415e01116f 100644
@@ -717,7 +717,7 @@ static int at91_twi_xfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num)
 	ret = (ret < 0) ? ret : num;
 out:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return ret;
 }
drivers/i2c/busses/i2c-cadence.c +1 -1
index b64026fbca66..47a1224ede6e 100644
@@ -1129,7 +1129,7 @@ static int cdns_i2c_master_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 #endif
 
 	pm_runtime_mark_last_busy(id->dev);
-	pm_runtime_put_autosuspend(id->dev);
+	__pm_runtime_put_autosuspend(id->dev);
 	return ret;
 }
 
drivers/i2c/busses/i2c-davinci.c +2 -2
index 71dc0a6688b7..454c422c665f 100644
@@ -561,7 +561,7 @@ i2c_davinci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
 out:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return ret;
 }
@@ -867,7 +867,7 @@ static int davinci_i2c_probe(struct platform_device *pdev)
 		goto err_unuse_clocks;
 
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return 0;
 
drivers/i2c/busses/i2c-designware-master.c +1 -1
index 528b969253a7..e01afd49d478 100644
@@ -881,7 +881,7 @@ i2c_dw_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
 done_nolock:
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return ret;
 }
drivers/i2c/busses/i2c-designware-pcidrv.c +1 -1
index 38265c3dc454..a1579bf2424c 100644
@@ -285,7 +285,7 @@ static int i2c_dw_pci_probe(struct pci_dev *pdev,
 
 	pm_runtime_set_autosuspend_delay(device, 1000);
 	pm_runtime_use_autosuspend(device);
-	pm_runtime_put_autosuspend(device);
+	__pm_runtime_put_autosuspend(device);
 	pm_runtime_allow(device);
 
 	return 0;
drivers/i2c/busses/i2c-hix5hd2.c +1 -1
index 370f32974763..1845191a607c 100644
@@ -374,7 +374,7 @@ static int hix5hd2_i2c_xfer(struct i2c_adapter *adap,
 
 out:
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 	return ret;
 }
 
drivers/i2c/busses/i2c-i801.c +2 -2
index 75dab01d43a7..089d430afe43 100644
@@ -934,7 +934,7 @@ static s32 i801_access(struct i2c_adapter *adap, u16 addr,
 	outb_p(SMBHSTSTS_INUSE_STS | STATUS_FLAGS, SMBHSTSTS(priv));
 
 	pm_runtime_mark_last_busy(&priv->pci_dev->dev);
-	pm_runtime_put_autosuspend(&priv->pci_dev->dev);
+	__pm_runtime_put_autosuspend(&priv->pci_dev->dev);
 	return ret;
 }
 
@@ -1797,7 +1797,7 @@ static int i801_probe(struct pci_dev *dev, const struct pci_device_id *id)
 	dev_pm_set_driver_flags(&dev->dev, DPM_FLAG_NO_DIRECT_COMPLETE);
 	pm_runtime_set_autosuspend_delay(&dev->dev, 1000);
 	pm_runtime_use_autosuspend(&dev->dev);
-	pm_runtime_put_autosuspend(&dev->dev);
+	__pm_runtime_put_autosuspend(&dev->dev);
 	pm_runtime_allow(&dev->dev);
 
 	return 0;
drivers/i2c/busses/i2c-img-scb.c +3 -3
index 02f75cf310aa..3891d06ee018 100644
@@ -1132,7 +1132,7 @@ static int img_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs,
 	}
 
 	pm_runtime_mark_last_busy(adap->dev.parent);
-	pm_runtime_put_autosuspend(adap->dev.parent);
+	__pm_runtime_put_autosuspend(adap->dev.parent);
 
 	return i2c->msg_status ? i2c->msg_status : num;
 }
@@ -1166,7 +1166,7 @@ static int img_i2c_init(struct img_i2c *i2c)
 			 (rev >> 24) & 0xff, (rev >> 16) & 0xff,
 			 (rev >> 8) & 0xff, rev & 0xff);
 		pm_runtime_mark_last_busy(i2c->adap.dev.parent);
-		pm_runtime_put_autosuspend(i2c->adap.dev.parent);
+		__pm_runtime_put_autosuspend(i2c->adap.dev.parent);
 		return -EINVAL;
 	}
 
@@ -1318,7 +1318,7 @@ static int img_i2c_init(struct img_i2c *i2c)
 	ret = img_i2c_reset_bus(i2c);
 
 	pm_runtime_mark_last_busy(i2c->adap.dev.parent);
-	pm_runtime_put_autosuspend(i2c->adap.dev.parent);
+	__pm_runtime_put_autosuspend(i2c->adap.dev.parent);
 
 	return ret;
 }
drivers/i2c/busses/i2c-imx-lpi2c.c +3 -3
index 8adf2963d764..5ad13c2e34ce 100644
@@ -286,7 +286,7 @@ static int lpi2c_imx_master_enable(struct lpi2c_imx_struct *lpi2c_imx)
 
 rpm_put:
 	pm_runtime_mark_last_busy(lpi2c_imx->adapter.dev.parent);
-	pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
+	__pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
 
 	return ret;
 }
@@ -300,7 +300,7 @@ static int lpi2c_imx_master_disable(struct lpi2c_imx_struct *lpi2c_imx)
 	writel(temp, lpi2c_imx->base + LPI2C_MCR);
 
 	pm_runtime_mark_last_busy(lpi2c_imx->adapter.dev.parent);
-	pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
+	__pm_runtime_put_autosuspend(lpi2c_imx->adapter.dev.parent);
 
 	return 0;
 }
@@ -645,7 +645,7 @@ static int lpi2c_imx_probe(struct platform_device *pdev)
 		goto rpm_disable;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_info(&lpi2c_imx->adapter.dev, "LPI2C adapter registered\n");
 
drivers/i2c/busses/i2c-imx.c +2 -2
index c2358356a8ff..7f529bc7f46d 100644
@@ -1336,7 +1336,7 @@ static int i2c_imx_xfer(struct i2c_adapter *adapter,
 	result = i2c_imx_xfer_common(adapter, msgs, num, false);
 
 	pm_runtime_mark_last_busy(i2c_imx->adapter.dev.parent);
-	pm_runtime_put_autosuspend(i2c_imx->adapter.dev.parent);
+	__pm_runtime_put_autosuspend(i2c_imx->adapter.dev.parent);
 
 	return result;
 }
@@ -1492,7 +1492,7 @@ static int i2c_imx_probe(struct platform_device *pdev)
 		goto clk_notifier_unregister;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_dbg(&i2c_imx->adapter.dev, "claimed irq %d\n", irq);
 	dev_dbg(&i2c_imx->adapter.dev, "device resources: %pR\n", res);
drivers/i2c/busses/i2c-mv64xxx.c +1 -1
index 874309580c33..32933db94550 100644
@@ -773,7 +773,7 @@ mv64xxx_i2c_xfer_core(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 	drv_data->msgs = NULL;
 
 	pm_runtime_mark_last_busy(&adap->dev);
-	pm_runtime_put_autosuspend(&adap->dev);
+	__pm_runtime_put_autosuspend(&adap->dev);
 
 	return ret;
 }
drivers/i2c/busses/i2c-nvidia-gpu.c +2 -2
index 541d808d62d0..07f77552662f 100644
@@ -217,7 +217,7 @@ static int gpu_i2c_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 			dev_err(i2cd->dev, "i2c stop failed %d\n", status2);
 	}
 	pm_runtime_mark_last_busy(i2cd->dev);
-	pm_runtime_put_autosuspend(i2cd->dev);
+	__pm_runtime_put_autosuspend(i2cd->dev);
 	return status;
 }
 
@@ -318,7 +318,7 @@ static int gpu_i2c_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 
 	pm_runtime_set_autosuspend_delay(dev, 3000);
 	pm_runtime_use_autosuspend(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	pm_runtime_allow(dev);
 
 	return 0;
drivers/i2c/busses/i2c-omap.c +3 -3
index 92faf03d64cf..339f4c01a1f8 100644
@@ -827,7 +827,7 @@ omap_i2c_xfer_common(struct i2c_adapter *adap, struct i2c_msg msgs[], int num,
 
 out:
 	pm_runtime_mark_last_busy(omap->dev);
-	pm_runtime_put_autosuspend(omap->dev);
+	__pm_runtime_put_autosuspend(omap->dev);
 	return r;
 }
 
@@ -1502,7 +1502,7 @@ omap_i2c_probe(struct platform_device *pdev)
 		 major, minor, omap->speed);
 
 	pm_runtime_mark_last_busy(omap->dev);
-	pm_runtime_put_autosuspend(omap->dev);
+	__pm_runtime_put_autosuspend(omap->dev);
 
 	return 0;
 
@@ -1590,7 +1590,7 @@ static int omap_i2c_suspend(struct device *dev)
 static int omap_i2c_resume(struct device *dev)
 {
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
drivers/i2c/busses/i2c-qcom-cci.c +1 -1
index 5cc791b3b57d..a8d6888ceb21 100644
@@ -452,7 +452,7 @@ static int cci_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
 err:
 	pm_runtime_mark_last_busy(cci->dev);
-	pm_runtime_put_autosuspend(cci->dev);
+	__pm_runtime_put_autosuspend(cci->dev);
 
 	return ret;
 }
drivers/i2c/busses/i2c-qcom-geni.c +1 -1
index 7a22e1f46e60..04f6e4c6b84f 100644
@@ -716,7 +716,7 @@ static int geni_i2c_xfer(struct i2c_adapter *adap,
 		ret = geni_i2c_fifo_xfer(gi2c, msgs, num);
 
 	pm_runtime_mark_last_busy(gi2c->se.dev);
-	pm_runtime_put_autosuspend(gi2c->se.dev);
+	__pm_runtime_put_autosuspend(gi2c->se.dev);
 	gi2c->cur = NULL;
 	gi2c->err = 0;
 	return ret;
drivers/i2c/busses/i2c-qup.c +2 -2
index 86ec391616b0..0f8061cae1d4 100644
@@ -1109,7 +1109,7 @@ static int qup_i2c_xfer(struct i2c_adapter *adap,
 out:
 
 	pm_runtime_mark_last_busy(qup->dev);
-	pm_runtime_put_autosuspend(qup->dev);
+	__pm_runtime_put_autosuspend(qup->dev);
 
 	return ret;
 }
@@ -1594,7 +1594,7 @@ static int qup_i2c_xfer_v2(struct i2c_adapter *adap,
 		ret = num;
 out:
 	pm_runtime_mark_last_busy(qup->dev);
-	pm_runtime_put_autosuspend(qup->dev);
+	__pm_runtime_put_autosuspend(qup->dev);
 
 	return ret;
 }
drivers/i2c/busses/i2c-riic.c +2 -2
index c218f73c3650..b4a213aa4c7b 100644
@@ -178,7 +178,7 @@ static int riic_xfer(struct i2c_adapter *adap, struct i2c_msg msgs[], int num)
 
  out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return riic->err ?: num;
 }
@@ -412,7 +412,7 @@ static int riic_init_hw(struct riic_dev *riic)
 	riic_clear_set_bit(riic, ICCR1_IICRST, 0, RIIC_ICCR1);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return 0;
 }
 
drivers/i2c/busses/i2c-rzv2m.c +1 -1
index 02b76e24a476..d7289fd8b35a 100644
@@ -378,7 +378,7 @@ static int rzv2m_i2c_xfer(struct i2c_adapter *adap,
 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
drivers/i2c/busses/i2c-sprd.c +2 -2
index 56b2e5c5fb49..551aba23cd1a 100644
@@ -303,7 +303,7 @@ static int sprd_i2c_xfer(struct i2c_adapter *i2c_adap,
 
 err_msg:
 	pm_runtime_mark_last_busy(i2c_dev->dev);
-	pm_runtime_put_autosuspend(i2c_dev->dev);
+	__pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return ret < 0 ? ret : im;
 }
@@ -560,7 +560,7 @@ static int sprd_i2c_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(i2c_dev->dev);
-	pm_runtime_put_autosuspend(i2c_dev->dev);
+	__pm_runtime_put_autosuspend(i2c_dev->dev);
 	return 0;
 
 err_rpm_put:
drivers/i2c/busses/i2c-stm32f7.c +5 -5
index 973a3a8c6d4a..c86874bf1070 100644
@@ -1757,7 +1757,7 @@ static int stm32f7_i2c_xfer_core(struct i2c_adapter *i2c_adap,
 
 pm_free:
 	pm_runtime_mark_last_busy(i2c_dev->dev);
-	pm_runtime_put_autosuspend(i2c_dev->dev);
+	__pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return (ret < 0) ? ret : num;
 }
@@ -1866,7 +1866,7 @@ static int stm32f7_i2c_smbus_xfer(struct i2c_adapter *adapter, u16 addr,
 
 pm_free:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
@@ -1973,7 +1973,7 @@ static int stm32f7_i2c_reg_slave(struct i2c_client *slave)
 		stm32f7_i2c_enable_wakeup(i2c_dev, false);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -2011,7 +2011,7 @@ static int stm32f7_i2c_unreg_slave(struct i2c_client *slave)
 	}
 
 	pm_runtime_mark_last_busy(i2c_dev->dev);
-	pm_runtime_put_autosuspend(i2c_dev->dev);
+	__pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return 0;
 }
@@ -2324,7 +2324,7 @@ static int stm32f7_i2c_probe(struct platform_device *pdev)
 	dev_info(i2c_dev->dev, "STM32F7 I2C-%d bus adapter\n", adap->nr);
 
 	pm_runtime_mark_last_busy(i2c_dev->dev);
-	pm_runtime_put_autosuspend(i2c_dev->dev);
+	__pm_runtime_put_autosuspend(i2c_dev->dev);
 
 	return 0;
 
drivers/i2c/busses/i2c-xiic.c +1 -1
index c4d3eb02da09..7292e649dea0 100644
@@ -1194,7 +1194,7 @@ static int xiic_xfer(struct i2c_adapter *adap, struct i2c_msg *msgs, int num)
 
 out:
 	pm_runtime_mark_last_busy(i2c->dev);
-	pm_runtime_put_autosuspend(i2c->dev);
+	__pm_runtime_put_autosuspend(i2c->dev);
 	return err;
 }
 
Signature · 1 line
2.39.5
author maintainer
#21 lore raw

PATCH 17/51 i3c: master: svc: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/i3c/master/svc-i3c-master.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/i3c/master/svc-i3c-master.c +8 -8
index a7bfc678153e..684f20fbc265 100644
@@ -576,7 +576,7 @@ static int svc_i3c_master_set_speed(struct i3c_master_controller *m,
 
 rpm_out:
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
 }
@@ -691,7 +691,7 @@ static int svc_i3c_master_bus_init(struct i3c_master_controller *m)
 
 rpm_out:
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
 }
@@ -713,7 +713,7 @@ static void svc_i3c_master_bus_cleanup(struct i3c_master_controller *m)
 	writel(0, master->regs + SVC_I3C_MCONFIG);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 }
 
 static int svc_i3c_master_reserve_slot(struct svc_i3c_master *master)
@@ -1070,7 +1070,7 @@ static int svc_i3c_master_do_daa(struct i3c_master_controller *m)
 
 rpm_out:
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
 }
@@ -1353,7 +1353,7 @@ static void svc_i3c_master_enqueue_xfer(struct svc_i3c_master *master,
 	spin_unlock_irqrestore(&master->xferqueue.lock, flags);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 }
 
 static bool
@@ -1643,7 +1643,7 @@ static int svc_i3c_master_disable_ibi(struct i3c_dev_desc *dev)
 	ret = i3c_master_disec_locked(m, dev->info.dyn_addr, I3C_CCC_EVENT_SIR);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 
 	return ret;
 }
@@ -1676,7 +1676,7 @@ static int svc_i3c_master_disable_hotjoin(struct i3c_master_controller *m)
 		svc_i3c_master_disable_interrupts(master);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 
 	return 0;
 }
@@ -1820,7 +1820,7 @@ static int svc_i3c_master_probe(struct platform_device *pdev)
 		goto rpm_disable;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
Signature · 7 lines
2.39.5


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
author maintainer
#22 lore raw

PATCH 18/51 i3c: dw: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/i3c/master/dw-i3c-master.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/i3c/master/dw-i3c-master.c +8 -8
index 8d694672c110..d2731ed66705 100644
@@ -700,7 +700,7 @@ static int dw_i3c_master_bus_init(struct i3c_master_controller *m)
 
 rpm_out:
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
 
@@ -817,7 +817,7 @@ static int dw_i3c_master_send_ccc_cmd(struct i3c_master_controller *m,
 		ret = dw_i3c_ccc_set(master, ccc);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
 
@@ -900,7 +900,7 @@ static int dw_i3c_master_daa(struct i3c_master_controller *m)
 
 rpm_out:
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
 
@@ -986,7 +986,7 @@ static int dw_i3c_master_priv_xfers(struct i3c_dev_desc *dev,
 	dw_i3c_master_free_xfer(xfer);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
 
@@ -1136,7 +1136,7 @@ static int dw_i3c_master_i2c_xfers(struct i2c_dev_desc *dev,
 	dw_i3c_master_free_xfer(xfer);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return ret;
 }
 
@@ -1304,7 +1304,7 @@ static int dw_i3c_master_disable_hotjoin(struct i3c_master_controller *m)
 	       master->regs + DEVICE_CTRL);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return 0;
 }
 
@@ -1330,7 +1330,7 @@ static int dw_i3c_master_enable_ibi(struct i3c_dev_desc *dev)
 	if (rc) {
 		dw_i3c_master_set_sir_enabled(master, dev, data->index, false);
 		pm_runtime_mark_last_busy(master->dev);
-		pm_runtime_put_autosuspend(master->dev);
+		__pm_runtime_put_autosuspend(master->dev);
 	}
 
 	return rc;
@@ -1350,7 +1350,7 @@ static int dw_i3c_master_disable_ibi(struct i3c_dev_desc *dev)
 	dw_i3c_master_set_sir_enabled(master, dev, data->index, false);
 
 	pm_runtime_mark_last_busy(master->dev);
-	pm_runtime_put_autosuspend(master->dev);
+	__pm_runtime_put_autosuspend(master->dev);
 	return 0;
 }
 
Signature · 7 lines
2.39.5


-- 
linux-i3c mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-i3c
author maintainer
#23 lore raw

PATCH 19/51 iio: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/iio/accel/bmc150-accel-core.c         |  2 +-
 drivers/iio/accel/bmi088-accel-core.c         |  6 +++---
 drivers/iio/accel/fxls8962af-core.c           |  2 +-
 drivers/iio/accel/kxcjk-1013.c                |  2 +-
 drivers/iio/accel/kxsd9.c                     |  6 +++---
 drivers/iio/accel/mma8452.c                   |  2 +-
 drivers/iio/accel/mma9551_core.c              |  2 +-
 drivers/iio/accel/msa311.c                    | 12 +++++------
 drivers/iio/adc/ab8500-gpadc.c                |  2 +-
 drivers/iio/adc/at91-sama5d2_adc.c            | 20 +++++++++----------
 drivers/iio/adc/rcar-gyroadc.c                |  2 +-
 drivers/iio/adc/stm32-adc-core.c              |  2 +-
 drivers/iio/adc/stm32-adc.c                   | 12 +++++------
 drivers/iio/adc/sun4i-gpadc-iio.c             |  4 ++--
 drivers/iio/adc/ti-ads1015.c                  |  2 +-
 drivers/iio/adc/ti-ads1100.c                  |  2 +-
 drivers/iio/adc/ti-ads1119.c                  |  4 ++--
 drivers/iio/chemical/atlas-sensor.c           |  4 ++--
 .../common/hid-sensors/hid-sensor-trigger.c   |  2 +-
 drivers/iio/dac/stm32-dac.c                   |  6 +++---
 drivers/iio/gyro/bmg160_core.c                |  2 +-
 drivers/iio/gyro/fxas21002c_core.c            |  2 +-
 drivers/iio/gyro/mpu3050-core.c               |  6 +++---
 drivers/iio/gyro/mpu3050-i2c.c                |  2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_accel.c | 10 +++++-----
 .../imu/inv_icm42600/inv_icm42600_buffer.c    |  2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  | 10 +++++-----
 .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |  2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    | 14 ++++++-------
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |  4 ++--
 drivers/iio/imu/kmx61.c                       |  2 +-
 drivers/iio/light/apds9306.c                  |  6 +++---
 drivers/iio/light/apds9960.c                  |  4 ++--
 drivers/iio/light/bh1780.c                    |  2 +-
 drivers/iio/light/gp2ap002.c                  |  4 ++--
 drivers/iio/light/isl29028.c                  |  2 +-
 drivers/iio/light/ltrf216a.c                  |  2 +-
 drivers/iio/light/pa12203001.c                |  2 +-
 drivers/iio/light/rpr0521.c                   |  2 +-
 drivers/iio/light/tsl2583.c                   |  2 +-
 drivers/iio/light/tsl2591.c                   |  4 ++--
 drivers/iio/light/us5182d.c                   |  2 +-
 drivers/iio/light/vcnl4000.c                  |  2 +-
 drivers/iio/light/vcnl4035.c                  |  2 +-
 drivers/iio/magnetometer/af8133j.c            |  4 ++--
 drivers/iio/magnetometer/ak8974.c             |  4 ++--
 drivers/iio/magnetometer/ak8975.c             |  2 +-
 drivers/iio/magnetometer/bmc150_magn.c        |  2 +-
 drivers/iio/magnetometer/tmag5273.c           |  4 ++--
 drivers/iio/magnetometer/yamaha-yas530.c      |  4 ++--
 drivers/iio/pressure/bmp280-core.c            | 10 +++++-----
 drivers/iio/pressure/icp10100.c               |  2 +-
 drivers/iio/pressure/mpl115.c                 |  4 ++--
 drivers/iio/pressure/zpa2326.c                |  4 ++--
 .../iio/proximity/pulsedlight-lidar-lite-v2.c |  2 +-
 drivers/iio/proximity/srf04.c                 |  2 +-
 drivers/iio/temperature/mlx90614.c            |  4 ++--
 drivers/iio/temperature/mlx90632.c            |  4 ++--
 drivers/iio/temperature/mlx90635.c            |  4 ++--
 59 files changed, 122 insertions(+), 122 deletions(-)
drivers/iio/accel/bmc150-accel-core.c +1 -1
index 0f32c1e92b4d..da02727c8626 100644
@@ -339,7 +339,7 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	if (ret < 0) {
drivers/iio/accel/bmi088-accel-core.c +3 -3
index fc1c1613d673..f57960509c7f 100644
@@ -375,7 +375,7 @@ static int bmi088_accel_read_raw(struct iio_dev *indio_dev,
 
 out_read_raw_pm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -419,7 +419,7 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
 
 		ret = bmi088_accel_set_scale(data, val, val2);
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		return ret;
 	case IIO_CHAN_INFO_SAMP_FREQ:
 		ret = pm_runtime_resume_and_get(dev);
@@ -428,7 +428,7 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
 
 		ret = bmi088_accel_set_sample_freq(data, val);
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		return ret;
 	default:
 		return -EINVAL;
drivers/iio/accel/fxls8962af-core.c +1 -1
index 37f33c29fb4b..50e1b2575af0 100644
@@ -219,7 +219,7 @@ static int fxls8962af_power_off(struct fxls8962af_data *data)
 	int ret;
 
 	pm_runtime_mark_last_busy(dev);
-	ret = pm_runtime_put_autosuspend(dev);
+	ret = __pm_runtime_put_autosuspend(dev);
 	if (ret)
 		dev_err(dev, "failed to power off\n");
 
drivers/iio/accel/kxcjk-1013.c +1 -1
index b76df8816323..01c6bc9b0f99 100644
@@ -625,7 +625,7 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
 		dev_err(&data->client->dev,
drivers/iio/accel/kxsd9.c +3 -3
index 70dfd6e354db..41dcf80784f1 100644
@@ -151,7 +151,7 @@ static int kxsd9_write_raw(struct iio_dev *indio_dev,
 	}
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return ret;
 }
@@ -199,7 +199,7 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,
 
 error_ret:
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return ret;
 };
@@ -251,7 +251,7 @@ static int kxsd9_buffer_postdisable(struct iio_dev *indio_dev)
 	struct kxsd9_state *st = iio_priv(indio_dev);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 }
drivers/iio/accel/mma8452.c +1 -1
index 62e6369e2269..17786868855b 100644
@@ -227,7 +227,7 @@ static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on)
 		ret = pm_runtime_resume_and_get(&client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&client->dev);
-		ret = pm_runtime_put_autosuspend(&client->dev);
+		ret = __pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	if (ret < 0) {
drivers/iio/accel/mma9551_core.c +1 -1
index b898f865fb87..d97cac6cc4da 100644
@@ -673,7 +673,7 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
 		ret = pm_runtime_resume_and_get(&client->dev);
 	else {
 		pm_runtime_mark_last_busy(&client->dev);
-		ret = pm_runtime_put_autosuspend(&client->dev);
+		ret = __pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	if (ret < 0) {
drivers/iio/accel/msa311.c +6 -6
index 57025354c7cd..21ec55dc1c5a 100644
@@ -608,7 +608,7 @@ static int msa311_read_raw_data(struct iio_dev *indio_dev,
 	iio_device_release_direct_mode(indio_dev);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err) {
 		dev_err(dev, "can't get axis %s (%pe)\n",
@@ -740,7 +740,7 @@ static int msa311_write_scale(struct iio_dev *indio_dev, int val, int val2)
 		}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err)
 		dev_err(dev, "can't update scale (%pe)\n", ERR_PTR(err));
@@ -781,7 +781,7 @@ static int msa311_write_samp_freq(struct iio_dev *indio_dev, int val, int val2)
 	iio_device_release_direct_mode(indio_dev);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err)
 		dev_err(dev, "can't update frequency (%pe)\n", ERR_PTR(err));
@@ -830,7 +830,7 @@ static int msa311_debugfs_reg_access(struct iio_dev *indio_dev,
 	mutex_unlock(&msa311->lock);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err)
 		dev_err(dev, "can't %s register %u from debugfs (%pe)\n",
@@ -853,7 +853,7 @@ static int msa311_buffer_postdisable(struct iio_dev *indio_dev)
 	struct device *dev = msa311->dev;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -1231,7 +1231,7 @@ static int msa311_probe(struct i2c_client *i2c)
 		return err;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	err = devm_iio_device_register(dev, indio_dev);
 	if (err)
drivers/iio/adc/ab8500-gpadc.c +1 -1
index 59f66e9cb0e8..f2d1b06bac44 100644
@@ -608,7 +608,7 @@ static int ab8500_gpadc_read(struct ab8500_gpadc *gpadc,
 
 	/* This eventually drops the regulator */
 	pm_runtime_mark_last_busy(gpadc->dev);
-	pm_runtime_put_autosuspend(gpadc->dev);
+	__pm_runtime_put_autosuspend(gpadc->dev);
 
 	return (high_data << 8) | low_data;
 
drivers/iio/adc/at91-sama5d2_adc.c +10 -10
index d7fd21e7c6e2..628e6e3c667c 100644
@@ -893,7 +893,7 @@ static int at91_adc_config_emr(struct at91_adc_state *st,
 	at91_adc_writel(st, EMR, emr);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	st->oversampling_ratio = oversampling_ratio;
 
@@ -968,7 +968,7 @@ static int at91_adc_configure_touch(struct at91_adc_state *st, bool state)
 		at91_adc_writel(st, TSMR, 0);
 
 		pm_runtime_mark_last_busy(st->dev);
-		pm_runtime_put_autosuspend(st->dev);
+		__pm_runtime_put_autosuspend(st->dev);
 		return 0;
 	}
 	/*
@@ -1140,7 +1140,7 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state)
 
 	if (!state) {
 		pm_runtime_mark_last_busy(st->dev);
-		pm_runtime_put_autosuspend(st->dev);
+		__pm_runtime_put_autosuspend(st->dev);
 	}
 
 	return 0;
@@ -1333,7 +1333,7 @@ static int at91_adc_buffer_prepare(struct iio_dev *indio_dev)
 
 pm_runtime_put:
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 	return ret;
 }
 
@@ -1391,7 +1391,7 @@ static int at91_adc_buffer_postdisable(struct iio_dev *indio_dev)
 		dmaengine_terminate_sync(st->dma_st.dma_chan);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 }
@@ -1600,7 +1600,7 @@ static void at91_adc_setup_samp_freq(struct iio_dev *indio_dev, unsigned freq,
 	at91_adc_writel(st, MR, mr);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	dev_dbg(&indio_dev->dev, "freq: %u, startup: %u, prescal: %u, tracktim=%u\n",
 		freq, startup, prescal, tracktim);
@@ -1806,7 +1806,7 @@ static int at91_adc_read_info_raw(struct iio_dev *indio_dev,
 
 pm_runtime_put:
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 	return ret;
 }
 
@@ -1899,7 +1899,7 @@ static int at91_adc_read_temp(struct iio_dev *indio_dev,
 	/* Revert previous settings. */
 	at91_adc_temp_sensor_configure(st, false);
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 unlock:
 	mutex_unlock(&st->lock);
 	iio_device_release_direct_mode(indio_dev);
@@ -2467,7 +2467,7 @@ static int at91_adc_probe(struct platform_device *pdev)
 		 readl_relaxed(st->base + st->soc_info.platform->layout->VERSION));
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 
@@ -2569,7 +2569,7 @@ static int at91_adc_resume(struct device *dev)
 	}
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 
drivers/iio/adc/rcar-gyroadc.c +1 -1
index 15a21d2860e7..d2a4557a5c07 100644
@@ -167,7 +167,7 @@ static int rcar_gyroadc_set_power(struct rcar_gyroadc *priv, bool on)
 		return pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		return pm_runtime_put_autosuspend(dev);
+		return __pm_runtime_put_autosuspend(dev);
 	}
 }
 
drivers/iio/adc/stm32-adc-core.c +1 -1
index 616dd729666a..a67e972bcc5d 100644
@@ -798,7 +798,7 @@ static int stm32_adc_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/iio/adc/stm32-adc.c +6 -6
index 32ca26ed59f7..50c3651413d2 100644
@@ -1456,7 +1456,7 @@ static int stm32_adc_single_conv(struct iio_dev *indio_dev,
 	stm32_adc_conv_irq_disable(adc);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1623,7 +1623,7 @@ static int stm32_adc_update_scan_mode(struct iio_dev *indio_dev,
 
 	ret = stm32_adc_conf_scan_seq(indio_dev, scan_mask);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1672,7 +1672,7 @@ static int stm32_adc_debugfs_reg_access(struct iio_dev *indio_dev,
 		*readval = stm32_adc_readl(adc, reg);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -1816,7 +1816,7 @@ static int stm32_adc_buffer_postenable(struct iio_dev *indio_dev)
 	stm32_adc_set_trig(indio_dev, NULL);
 err_pm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1839,7 +1839,7 @@ static int stm32_adc_buffer_predisable(struct iio_dev *indio_dev)
 		dev_err(&indio_dev->dev, "Can't clear trigger\n");
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -2473,7 +2473,7 @@ static int stm32_adc_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (IS_ENABLED(CONFIG_DEBUG_FS))
 		stm32_adc_debugfs_init(indio_dev);
drivers/iio/adc/sun4i-gpadc-iio.c +2 -2
index 00a3a4db0fe0..43746e026042 100644
@@ -248,7 +248,7 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
 	pm_runtime_mark_last_busy(indio_dev->dev.parent);
 
 err:
-	pm_runtime_put_autosuspend(indio_dev->dev.parent);
+	__pm_runtime_put_autosuspend(indio_dev->dev.parent);
 	disable_irq(irq);
 	mutex_unlock(&info->mutex);
 
@@ -273,7 +273,7 @@ static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val)
 		regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, val);
 
 		pm_runtime_mark_last_busy(indio_dev->dev.parent);
-		pm_runtime_put_autosuspend(indio_dev->dev.parent);
+		__pm_runtime_put_autosuspend(indio_dev->dev.parent);
 
 		return 0;
 	}
drivers/iio/adc/ti-ads1015.c +1 -1
index 052d2124b215..380aeabc8a72 100644
@@ -377,7 +377,7 @@ static int ads1015_set_power_state(struct ads1015_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret < 0 ? ret : 0;
drivers/iio/adc/ti-ads1100.c +1 -1
index 1e46f07a9ca6..038901c93b7d 100644
@@ -105,7 +105,7 @@ static int ads1100_get_adc_result(struct ads1100_data *data, int chan, int *val)
 	ret = i2c_master_recv(data->client, (char *)&buffer, sizeof(buffer));
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 
 	if (ret < 0) {
 		dev_err(&data->client->dev, "I2C read fail: %d\n", ret);
drivers/iio/adc/ti-ads1119.c +2 -2
index 1c7606375149..52e20c4ed8bb 100644
@@ -292,7 +292,7 @@ static int ads1119_single_conversion(struct ads1119_state *st,
 	ret = IIO_VAL_INT;
 pdown:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
@@ -466,7 +466,7 @@ static int ads1119_triggered_buffer_postdisable(struct iio_dev *indio_dev)
 		return ret;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
drivers/iio/chemical/atlas-sensor.c +2 -2
index baf93e5e3ca7..d0ab2656919e 100644
@@ -427,7 +427,7 @@ static int atlas_buffer_predisable(struct iio_dev *indio_dev)
 		return ret;
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	ret = pm_runtime_put_autosuspend(&data->client->dev);
+	ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	if (ret)
 		return ret;
 
@@ -492,7 +492,7 @@ static int atlas_read_measurement(struct atlas_data *data, int reg, __be32 *val)
 	ret = regmap_bulk_read(data->regmap, reg, val, sizeof(*val));
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
drivers/iio/common/hid-sensors/hid-sensor-trigger.c +1 -1
index ad8910e6ad59..e6bf7eb4e23c 100644
@@ -165,7 +165,7 @@ int hid_sensor_power_state(struct hid_sensor_common *st, bool state)
 		atomic_dec(&st->user_requested_state);
 		pm_runtime_mark_last_busy(&st->pdev->dev);
 		pm_runtime_use_autosuspend(&st->pdev->dev);
-		ret = pm_runtime_put_autosuspend(&st->pdev->dev);
+		ret = __pm_runtime_put_autosuspend(&st->pdev->dev);
 	}
 	if (ret < 0)
 		return ret;
drivers/iio/dac/stm32-dac.c +3 -3
index 5a722f307e7e..8dadf90546b4 100644
@@ -97,7 +97,7 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
 
 	if (!enable) {
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 	return 0;
@@ -105,7 +105,7 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
 err_put_pm:
 	if (enable) {
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
@@ -350,7 +350,7 @@ static int stm32_dac_probe(struct platform_device *pdev)
 		goto err_pm_put;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/iio/gyro/bmg160_core.c +1 -1
index 10728d5ccae3..97f3045dc2a9 100644
@@ -314,7 +314,7 @@ static int bmg160_set_power_state(struct bmg160_data *data, bool on)
 		ret = pm_runtime_get_sync(dev);
 	else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	if (ret < 0) {
drivers/iio/gyro/fxas21002c_core.c +1 -1
index 688966129f70..f6263187f6c7 100644
@@ -375,7 +375,7 @@ static int  fxas21002c_pm_put(struct fxas21002c_data *data)
 
 	pm_runtime_mark_last_busy(dev);
 
-	return pm_runtime_put_autosuspend(dev);
+	return __pm_runtime_put_autosuspend(dev);
 }
 
 static int fxas21002c_temp_get(struct fxas21002c_data *data, int *val)
drivers/iio/gyro/mpu3050-core.c +3 -3
index b6883e8b2a8b..93d9d0e4626b 100644
@@ -371,7 +371,7 @@ static int mpu3050_read_raw(struct iio_dev *indio_dev,
 out_read_raw_unlock:
 	mutex_unlock(&mpu3050->lock);
 	pm_runtime_mark_last_busy(mpu3050->dev);
-	pm_runtime_put_autosuspend(mpu3050->dev);
+	__pm_runtime_put_autosuspend(mpu3050->dev);
 
 	return ret;
 }
@@ -663,7 +663,7 @@ static int mpu3050_buffer_postdisable(struct iio_dev *indio_dev)
 	struct mpu3050 *mpu3050 = iio_priv(indio_dev);
 
 	pm_runtime_mark_last_busy(mpu3050->dev);
-	pm_runtime_put_autosuspend(mpu3050->dev);
+	__pm_runtime_put_autosuspend(mpu3050->dev);
 
 	return 0;
 }
@@ -977,7 +977,7 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,
 			dev_err(mpu3050->dev, "error resetting FIFO\n");
 
 		pm_runtime_mark_last_busy(mpu3050->dev);
-		pm_runtime_put_autosuspend(mpu3050->dev);
+		__pm_runtime_put_autosuspend(mpu3050->dev);
 		mpu3050->hw_irq_trigger = false;
 
 		return 0;
drivers/iio/gyro/mpu3050-i2c.c +1 -1
index 29ecfa6fd633..49256fc6c6ad 100644
@@ -28,7 +28,7 @@ static int mpu3050_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id)
 	struct mpu3050 *mpu3050 = i2c_mux_priv(mux);
 
 	pm_runtime_mark_last_busy(mpu3050->dev);
-	pm_runtime_put_autosuspend(mpu3050->dev);
+	__pm_runtime_put_autosuspend(mpu3050->dev);
 	return 0;
 }
 
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c +5 -5
index 56ac19814250..4e43deadf02f 100644
@@ -292,7 +292,7 @@ static int inv_icm42600_accel_read_sensor(struct iio_dev *indio_dev,
 exit:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
@@ -370,7 +370,7 @@ static int inv_icm42600_accel_write_scale(struct iio_dev *indio_dev,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -474,7 +474,7 @@ static int inv_icm42600_accel_write_odr(struct iio_dev *indio_dev,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -526,7 +526,7 @@ static int inv_icm42600_accel_read_offset(struct inv_icm42600_state *st,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	if (ret)
 		return ret;
 
@@ -664,7 +664,7 @@ static int inv_icm42600_accel_write_offset(struct inv_icm42600_state *st,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c +1 -1
index aae7c56481a3..acc141657d3f 100644
@@ -440,7 +440,7 @@ static int inv_icm42600_buffer_postdisable(struct iio_dev *indio_dev)
 		msleep(sleep);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c +5 -5
index 938af5b640b0..3784b1719433 100644
@@ -188,7 +188,7 @@ static int inv_icm42600_gyro_read_sensor(struct inv_icm42600_state *st,
 exit:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
@@ -287,7 +287,7 @@ static int inv_icm42600_gyro_write_scale(struct iio_dev *indio_dev,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -382,7 +382,7 @@ static int inv_icm42600_gyro_write_odr(struct iio_dev *indio_dev,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -434,7 +434,7 @@ static int inv_icm42600_gyro_read_offset(struct inv_icm42600_state *st,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	if (ret)
 		return ret;
 
@@ -571,7 +571,7 @@ static int inv_icm42600_gyro_write_offset(struct inv_icm42600_state *st,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c +1 -1
index 213cce1c3111..4c2f2d6dfff9 100644
@@ -38,7 +38,7 @@ static int inv_icm42600_temp_read(struct inv_icm42600_state *st, int16_t *temp)
 exit:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +7 -7
index fdb48c5e5686..8fb35f37e5d2 100644
@@ -708,12 +708,12 @@ static int inv_mpu6050_read_channel_data(struct iio_dev *indio_dev,
 	}
 
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 
 	return ret;
 
 error_power_off:
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 	return result;
 }
 
@@ -913,7 +913,7 @@ static int inv_mpu6050_write_raw(struct iio_dev *indio_dev,
 	}
 
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 error_write_raw_unlock:
 	mutex_unlock(&st->lock);
 	iio_device_release_direct_mode(indio_dev);
@@ -1121,14 +1121,14 @@ static int inv_mpu6050_enable_wom(struct inv_mpu6050_state *st, bool en)
 		}
 
 		pm_runtime_mark_last_busy(pdev);
-		pm_runtime_put_autosuspend(pdev);
+		__pm_runtime_put_autosuspend(pdev);
 	}
 
 	return result;
 
 error_suspend:
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 	return result;
 }
 
@@ -1227,7 +1227,7 @@ static int inv_mpu6050_write_event_value(struct iio_dev *indio_dev,
 	result = inv_mpu6050_set_wom_threshold(st, value, INV_MPU6050_FREQ_DIVIDER(st));
 
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 
 	return result;
 }
@@ -1336,7 +1336,7 @@ inv_mpu6050_fifo_rate_store(struct device *dev, struct device_attribute *attr,
 
 	pm_runtime_mark_last_busy(pdev);
 fifo_rate_fail_power_off:
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 fifo_rate_fail_unlock:
 	mutex_unlock(&st->lock);
 	if (result)
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c +2 -2
index 3bfeabab0ec4..e501ac9276d4 100644
@@ -196,13 +196,13 @@ static int inv_mpu6050_set_enable(struct iio_dev *indio_dev, bool enable)
 		if (result)
 			goto error_power_off;
 		pm_runtime_mark_last_busy(pdev);
-		pm_runtime_put_autosuspend(pdev);
+		__pm_runtime_put_autosuspend(pdev);
 	}
 
 	return 0;
 
 error_power_off:
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 	return result;
 }
 
drivers/iio/imu/kmx61.c +1 -1
index c61c012e25bb..75942b0b95d7 100644
@@ -753,7 +753,7 @@ static int kmx61_set_power_state(struct kmx61_data *data, bool on, u8 device)
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
 		dev_err(&data->client->dev,
drivers/iio/light/apds9306.c +3 -3
index 079e02be1005..ade25e461397 100644
@@ -538,7 +538,7 @@ static int apds9306_read_data(struct apds9306_data *data, int *val, int reg)
 	*val = get_unaligned_le24(&buff);
 
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
 }
@@ -1119,7 +1119,7 @@ static int apds9306_write_event_config(struct iio_dev *indio_dev,
 				return ret;
 
 			pm_runtime_mark_last_busy(data->dev);
-			pm_runtime_put_autosuspend(data->dev);
+			__pm_runtime_put_autosuspend(data->dev);
 
 			return 0;
 		}
@@ -1315,7 +1315,7 @@ static int apds9306_probe(struct i2c_client *client)
 	if (ret)
 		return dev_err_probe(dev, ret, "failed iio device registration\n");
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
drivers/iio/light/apds9960.c +2 -2
index 3c14e4c30805..13db160be094 100644
@@ -497,7 +497,7 @@ static int apds9960_set_power_state(struct apds9960_data *data, bool on)
 				     APDS9960_MAX_INT_TIME_IN_US);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	mutex_unlock(&data->lock);
@@ -910,7 +910,7 @@ static int apds9960_buffer_predisable(struct iio_dev *indio_dev)
 	if (ret)
 		return ret;
 
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 
 	return 0;
 }
drivers/iio/light/bh1780.c +1 -1
index 475f44954f61..d22bf5f684b1 100644
@@ -112,7 +112,7 @@ static int bh1780_read_raw(struct iio_dev *indio_dev,
 			if (value < 0)
 				return value;
 			pm_runtime_mark_last_busy(&bh1780->client->dev);
-			pm_runtime_put_autosuspend(&bh1780->client->dev);
+			__pm_runtime_put_autosuspend(&bh1780->client->dev);
 			*val = value;
 
 			return IIO_VAL_INT;
drivers/iio/light/gp2ap002.c +2 -2
index f8b1d7dd6f5f..aeaba841dbb4 100644
@@ -272,7 +272,7 @@ static int gp2ap002_read_raw(struct iio_dev *indio_dev,
 
 out:
 	pm_runtime_mark_last_busy(gp2ap002->dev);
-	pm_runtime_put_autosuspend(gp2ap002->dev);
+	__pm_runtime_put_autosuspend(gp2ap002->dev);
 
 	return ret;
 }
@@ -354,7 +354,7 @@ static int gp2ap002_write_event_config(struct iio_dev *indio_dev,
 		gp2ap002->enabled = true;
 	} else {
 		pm_runtime_mark_last_busy(gp2ap002->dev);
-		pm_runtime_put_autosuspend(gp2ap002->dev);
+		__pm_runtime_put_autosuspend(gp2ap002->dev);
 		gp2ap002->enabled = false;
 	}
 
drivers/iio/light/isl29028.c +1 -1
index 95bfb3ffa519..63b6fdda25ed 100644
@@ -342,7 +342,7 @@ static int isl29028_set_pm_runtime_busy(struct isl29028_chip *chip, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
drivers/iio/light/ltrf216a.c +1 -1
index 37eecff571b9..228f03c7f192 100644
@@ -209,7 +209,7 @@ static int ltrf216a_set_power_state(struct ltrf216a_data *data, bool on)
 		}
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
drivers/iio/light/pa12203001.c +1 -1
index b920bf82c102..38313e712e65 100644
@@ -190,7 +190,7 @@ static int pa12203001_set_power_state(struct pa12203001_data *data, bool on,
 
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 
 	return ret;
drivers/iio/light/rpr0521.c +1 -1
index 78c08e0bd077..2010b6387be7 100644
@@ -363,7 +363,7 @@ static int rpr0521_set_power_state(struct rpr0521_data *data, bool on,
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
 		dev_err(&data->client->dev,
drivers/iio/light/tsl2583.c +1 -1
index 02ad11611b9c..d41fd79e724c 100644
@@ -647,7 +647,7 @@ static int tsl2583_set_pm_runtime_busy(struct tsl2583_chip *chip, bool on)
 		ret = pm_runtime_resume_and_get(&chip->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&chip->client->dev);
-		ret = pm_runtime_put_autosuspend(&chip->client->dev);
+		ret = __pm_runtime_put_autosuspend(&chip->client->dev);
 	}
 
 	return ret;
drivers/iio/light/tsl2591.c +2 -2
index 850c2465992f..43adaffe1400 100644
@@ -773,7 +773,7 @@ static int tsl2591_read_raw(struct iio_dev *indio_dev,
 	mutex_unlock(&chip->als_mutex);
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 }
@@ -996,7 +996,7 @@ static int tsl2591_write_event_config(struct iio_dev *indio_dev,
 	} else if (!state && chip->events_enabled) {
 		chip->events_enabled = false;
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	return 0;
drivers/iio/light/us5182d.c +1 -1
index de6967ac3b0b..901288236d38 100644
@@ -370,7 +370,7 @@ static int us5182d_set_power_state(struct us5182d_data *data, bool on)
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 
 	return ret;
drivers/iio/light/vcnl4000.c +1 -1
index 4e3641ff2ed4..2877880897e4 100644
@@ -582,7 +582,7 @@ static int vcnl4000_set_pm_runtime_state(struct vcnl4000_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
drivers/iio/light/vcnl4035.c +1 -1
index 337a1332c2c6..a7393255f6ac 100644
@@ -150,7 +150,7 @@ static int vcnl4035_set_pm_runtime_state(struct vcnl4035_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
drivers/iio/magnetometer/af8133j.c +2 -2
index d81d89af6283..f0530854698d 100644
@@ -235,7 +235,7 @@ static int af8133j_read_measurement(struct af8133j_data *data, __le16 buf[3])
 
 out_rpm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -454,7 +454,7 @@ static int af8133j_probe(struct i2c_client *client)
 	if (ret)
 		return ret;
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	indio_dev->info = &af8133j_info;
 	indio_dev->name = "af8133j";
drivers/iio/magnetometer/ak8974.c +2 -2
index 8306a18706ac..eed25cd701f0 100644
@@ -584,7 +584,7 @@ static int ak8974_measure_channel(struct ak8974 *ak8974, unsigned long address,
 out_unlock:
 	mutex_unlock(&ak8974->lock);
 	pm_runtime_mark_last_busy(&ak8974->i2c->dev);
-	pm_runtime_put_autosuspend(&ak8974->i2c->dev);
+	__pm_runtime_put_autosuspend(&ak8974->i2c->dev);
 
 	return ret;
 }
@@ -679,7 +679,7 @@ static void ak8974_fill_buffer(struct iio_dev *indio_dev)
  out_unlock:
 	mutex_unlock(&ak8974->lock);
 	pm_runtime_mark_last_busy(&ak8974->i2c->dev);
-	pm_runtime_put_autosuspend(&ak8974->i2c->dev);
+	__pm_runtime_put_autosuspend(&ak8974->i2c->dev);
 }
 
 static irqreturn_t ak8974_handle_trigger(int irq, void *p)
drivers/iio/magnetometer/ak8975.c +1 -1
index 18077fb463a9..b637385f9d26 100644
@@ -776,7 +776,7 @@ static int ak8975_read_axis(struct iio_dev *indio_dev, int index, int *val)
 	mutex_unlock(&data->lock);
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 
 	/* Swap bytes and convert to valid range. */
 	buff = le16_to_cpu(rval);
drivers/iio/magnetometer/bmc150_magn.c +1 -1
index 06d5a1ef1fbd..26dc68e4270d 100644
@@ -268,7 +268,7 @@ static int bmc150_magn_set_power_state(struct bmc150_magn_data *data, bool on)
 		ret = pm_runtime_resume_and_get(data->dev);
 	} else {
 		pm_runtime_mark_last_busy(data->dev);
-		ret = pm_runtime_put_autosuspend(data->dev);
+		ret = __pm_runtime_put_autosuspend(data->dev);
 	}
 
 	if (ret < 0) {
drivers/iio/magnetometer/tmag5273.c +2 -2
index 4187abe12784..bec579b7c6c6 100644
@@ -296,7 +296,7 @@ static int tmag5273_read_raw(struct iio_dev *indio_dev,
 		ret = tmag5273_get_measure(data, &t, &x, &y, &z, &angle, &magnitude);
 
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 
 		if (ret)
 			return ret;
@@ -669,7 +669,7 @@ static int tmag5273_probe(struct i2c_client *i2c)
 	indio_dev->num_channels = ARRAY_SIZE(tmag5273_channels);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	ret = devm_iio_device_register(dev, indio_dev);
 	if (ret)
drivers/iio/magnetometer/yamaha-yas530.c +2 -2
index 65011a8598d3..62df8b91df3a 100644
@@ -623,7 +623,7 @@ static int yas5xx_read_raw(struct iio_dev *indio_dev,
 		pm_runtime_get_sync(yas5xx->dev);
 		ret = ci->get_measure(yas5xx, &t, &x, &y, &z);
 		pm_runtime_mark_last_busy(yas5xx->dev);
-		pm_runtime_put_autosuspend(yas5xx->dev);
+		__pm_runtime_put_autosuspend(yas5xx->dev);
 		if (ret)
 			return ret;
 		switch (chan->address) {
@@ -664,7 +664,7 @@ static void yas5xx_fill_buffer(struct iio_dev *indio_dev)
 	pm_runtime_get_sync(yas5xx->dev);
 	ret = ci->get_measure(yas5xx, &t, &x, &y, &z);
 	pm_runtime_mark_last_busy(yas5xx->dev);
-	pm_runtime_put_autosuspend(yas5xx->dev);
+	__pm_runtime_put_autosuspend(yas5xx->dev);
 	if (ret) {
 		dev_err(yas5xx->dev, "error refilling buffer\n");
 		return;
drivers/iio/pressure/bmp280-core.c +5 -5
index ca4915c9a394..806933baeffd 100644
@@ -729,7 +729,7 @@ static int bmp280_read_raw(struct iio_dev *indio_dev,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp280_read_raw_impl(indio_dev, chan, val, val2, mask);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -904,7 +904,7 @@ static int bmp280_write_raw(struct iio_dev *indio_dev,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp280_write_raw_impl(indio_dev, chan, val, val2, mask);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -1960,7 +1960,7 @@ static int bmp580_nvmem_read(void *priv, unsigned int offset, void *val,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp580_nvmem_read_impl(priv, offset, val, bytes);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -2035,7 +2035,7 @@ static int bmp580_nvmem_write(void *priv, unsigned int offset, void *val,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp580_nvmem_write_impl(priv, offset, val, bytes);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -2641,7 +2641,7 @@ static int bmp280_buffer_postdisable(struct iio_dev *indio_dev)
 	struct bmp280_data *data = iio_priv(indio_dev);
 
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
 }
drivers/iio/pressure/icp10100.c +1 -1
index 3e0bf5d31ad7..866381bb1452 100644
@@ -267,7 +267,7 @@ static int icp10100_get_measures(struct icp10100_state *st,
 
 	pm_runtime_mark_last_busy(&st->client->dev);
 error_measure:
-	pm_runtime_put_autosuspend(&st->client->dev);
+	__pm_runtime_put_autosuspend(&st->client->dev);
 	return ret;
 }
 
drivers/iio/pressure/mpl115.c +2 -2
index 02ea38c8a3e4..70b711b16e52 100644
@@ -109,7 +109,7 @@ static int mpl115_read_raw(struct iio_dev *indio_dev,
 		if (ret < 0)
 			return ret;
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 
 		return IIO_VAL_INT_PLUS_MICRO;
 	case IIO_CHAN_INFO_RAW:
@@ -119,7 +119,7 @@ static int mpl115_read_raw(struct iio_dev *indio_dev,
 		if (ret < 0)
 			return ret;
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 		*val = ret >> 6;
 
 		return IIO_VAL_INT;
drivers/iio/pressure/zpa2326.c +2 -2
index 950f8dee2b26..7274855d0297 100644
@@ -698,7 +698,7 @@ static void zpa2326_suspend(struct iio_dev *indio_dev)
 	zpa2326_sleep(indio_dev);
 
 	pm_runtime_mark_last_busy(parent);
-	pm_runtime_put_autosuspend(parent);
+	__pm_runtime_put_autosuspend(parent);
 }
 
 static void zpa2326_init_runtime(struct device *parent)
@@ -709,7 +709,7 @@ static void zpa2326_init_runtime(struct device *parent)
 	pm_runtime_set_autosuspend_delay(parent, 1000);
 	pm_runtime_use_autosuspend(parent);
 	pm_runtime_mark_last_busy(parent);
-	pm_runtime_put_autosuspend(parent);
+	__pm_runtime_put_autosuspend(parent);
 }
 
 static void zpa2326_fini_runtime(struct device *parent)
drivers/iio/proximity/pulsedlight-lidar-lite-v2.c +1 -1
index 5c959730aecd..6be27497d6e3 100644
@@ -192,7 +192,7 @@ static int lidar_get_measurement(struct lidar_data *data, u16 *reg)
 		ret = -EIO;
 	}
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 }
drivers/iio/proximity/srf04.c +1 -1
index 86c57672fc7e..ecea2671ce62 100644
@@ -119,7 +119,7 @@ static int srf04_read(struct srf04_data *data)
 
 	if (data->gpiod_power) {
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 	}
 
 	/* it should not take more than 20 ms until echo is rising */
drivers/iio/temperature/mlx90614.c +2 -2
index 740018d4b3df..22bed79589d1 100644
@@ -212,7 +212,7 @@ static int mlx90614_power_get(struct mlx90614_data *data, bool startup)
 		if (time_before(now, data->ready_timestamp) &&
 		    msleep_interruptible(jiffies_to_msecs(
 				data->ready_timestamp - now)) != 0) {
-			pm_runtime_put_autosuspend(&data->client->dev);
+			__pm_runtime_put_autosuspend(&data->client->dev);
 			return -EINTR;
 		}
 	}
@@ -226,7 +226,7 @@ static void mlx90614_power_put(struct mlx90614_data *data)
 		return;
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 }
 #else
 static inline int mlx90614_power_get(struct mlx90614_data *data, bool startup)
drivers/iio/temperature/mlx90632.c +2 -2
index ae4ea587e7f9..c8cea6a4f390 100644
@@ -1044,7 +1044,7 @@ static int mlx90632_read_raw(struct iio_dev *indio_dev,
 
 mlx90632_read_raw_pm:
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 	return ret;
 }
 
@@ -1273,7 +1273,7 @@ static int mlx90632_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, MLX90632_SLEEP_DELAY_MS);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return devm_iio_device_register(&client->dev, indio_dev);
 }
drivers/iio/temperature/mlx90635.c +2 -2
index f7f88498ba0e..77ea81aa5c9e 100644
@@ -750,7 +750,7 @@ static int mlx90635_read_raw(struct iio_dev *indio_dev,
 
 mlx90635_read_raw_pm:
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 	return ret;
 }
 
@@ -1023,7 +1023,7 @@ static int mlx90635_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, MLX90635_SLEEP_DELAY_MS);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return devm_iio_device_register(&client->dev, indio_dev);
 }
Signature · 1 line
2.39.5
#24 lore raw

Re: [PATCH 19/51] iio: Switch to __pm_runtime_put_autosuspend()

Quoted 4 lines · On Fri, 4 Oct 2024 12:41:23 +0300 Sakari Ailus <[email protected]>…

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

Similar to some of the other feedback you've had, there is no obvious point in this churn. Given mark_last_busy() should be non destructive, just call it twice, then remove the unnecessary calls after you have added on in autosuspend.

Jonathan

Quoted 1,392 lines
---
 drivers/iio/accel/bmc150-accel-core.c         |  2 +-
 drivers/iio/accel/bmi088-accel-core.c         |  6 +++---
 drivers/iio/accel/fxls8962af-core.c           |  2 +-
 drivers/iio/accel/kxcjk-1013.c                |  2 +-
 drivers/iio/accel/kxsd9.c                     |  6 +++---
 drivers/iio/accel/mma8452.c                   |  2 +-
 drivers/iio/accel/mma9551_core.c              |  2 +-
 drivers/iio/accel/msa311.c                    | 12 +++++------
 drivers/iio/adc/ab8500-gpadc.c                |  2 +-
 drivers/iio/adc/at91-sama5d2_adc.c            | 20 +++++++++----------
 drivers/iio/adc/rcar-gyroadc.c                |  2 +-
 drivers/iio/adc/stm32-adc-core.c              |  2 +-
 drivers/iio/adc/stm32-adc.c                   | 12 +++++------
 drivers/iio/adc/sun4i-gpadc-iio.c             |  4 ++--
 drivers/iio/adc/ti-ads1015.c                  |  2 +-
 drivers/iio/adc/ti-ads1100.c                  |  2 +-
 drivers/iio/adc/ti-ads1119.c                  |  4 ++--
 drivers/iio/chemical/atlas-sensor.c           |  4 ++--
 .../common/hid-sensors/hid-sensor-trigger.c   |  2 +-
 drivers/iio/dac/stm32-dac.c                   |  6 +++---
 drivers/iio/gyro/bmg160_core.c                |  2 +-
 drivers/iio/gyro/fxas21002c_core.c            |  2 +-
 drivers/iio/gyro/mpu3050-core.c               |  6 +++---
 drivers/iio/gyro/mpu3050-i2c.c                |  2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_accel.c | 10 +++++-----
 .../imu/inv_icm42600/inv_icm42600_buffer.c    |  2 +-
 .../iio/imu/inv_icm42600/inv_icm42600_gyro.c  | 10 +++++-----
 .../iio/imu/inv_icm42600/inv_icm42600_temp.c  |  2 +-
 drivers/iio/imu/inv_mpu6050/inv_mpu_core.c    | 14 ++++++-------
 drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c |  4 ++--
 drivers/iio/imu/kmx61.c                       |  2 +-
 drivers/iio/light/apds9306.c                  |  6 +++---
 drivers/iio/light/apds9960.c                  |  4 ++--
 drivers/iio/light/bh1780.c                    |  2 +-
 drivers/iio/light/gp2ap002.c                  |  4 ++--
 drivers/iio/light/isl29028.c                  |  2 +-
 drivers/iio/light/ltrf216a.c                  |  2 +-
 drivers/iio/light/pa12203001.c                |  2 +-
 drivers/iio/light/rpr0521.c                   |  2 +-
 drivers/iio/light/tsl2583.c                   |  2 +-
 drivers/iio/light/tsl2591.c                   |  4 ++--
 drivers/iio/light/us5182d.c                   |  2 +-
 drivers/iio/light/vcnl4000.c                  |  2 +-
 drivers/iio/light/vcnl4035.c                  |  2 +-
 drivers/iio/magnetometer/af8133j.c            |  4 ++--
 drivers/iio/magnetometer/ak8974.c             |  4 ++--
 drivers/iio/magnetometer/ak8975.c             |  2 +-
 drivers/iio/magnetometer/bmc150_magn.c        |  2 +-
 drivers/iio/magnetometer/tmag5273.c           |  4 ++--
 drivers/iio/magnetometer/yamaha-yas530.c      |  4 ++--
 drivers/iio/pressure/bmp280-core.c            | 10 +++++-----
 drivers/iio/pressure/icp10100.c               |  2 +-
 drivers/iio/pressure/mpl115.c                 |  4 ++--
 drivers/iio/pressure/zpa2326.c                |  4 ++--
 .../iio/proximity/pulsedlight-lidar-lite-v2.c |  2 +-
 drivers/iio/proximity/srf04.c                 |  2 +-
 drivers/iio/temperature/mlx90614.c            |  4 ++--
 drivers/iio/temperature/mlx90632.c            |  4 ++--
 drivers/iio/temperature/mlx90635.c            |  4 ++--
 59 files changed, 122 insertions(+), 122 deletions(-)
drivers/iio/accel/bmc150-accel-core.c +1 -1
index 0f32c1e92b4d..da02727c8626 100644
@@ -339,7 +339,7 @@ static int bmc150_accel_set_power_state(struct bmc150_accel_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	if (ret < 0) {
drivers/iio/accel/bmi088-accel-core.c +3 -3
index fc1c1613d673..f57960509c7f 100644
@@ -375,7 +375,7 @@ static int bmi088_accel_read_raw(struct iio_dev *indio_dev,
 
 out_read_raw_pm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -419,7 +419,7 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
 
 		ret = bmi088_accel_set_scale(data, val, val2);
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		return ret;
 	case IIO_CHAN_INFO_SAMP_FREQ:
 		ret = pm_runtime_resume_and_get(dev);
@@ -428,7 +428,7 @@ static int bmi088_accel_write_raw(struct iio_dev *indio_dev,
 
 		ret = bmi088_accel_set_sample_freq(data, val);
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		return ret;
 	default:
 		return -EINVAL;
drivers/iio/accel/fxls8962af-core.c +1 -1
index 37f33c29fb4b..50e1b2575af0 100644
@@ -219,7 +219,7 @@ static int fxls8962af_power_off(struct fxls8962af_data *data)
 	int ret;
 
 	pm_runtime_mark_last_busy(dev);
-	ret = pm_runtime_put_autosuspend(dev);
+	ret = __pm_runtime_put_autosuspend(dev);
 	if (ret)
 		dev_err(dev, "failed to power off\n");
 
drivers/iio/accel/kxcjk-1013.c +1 -1
index b76df8816323..01c6bc9b0f99 100644
@@ -625,7 +625,7 @@ static int kxcjk1013_set_power_state(struct kxcjk1013_data *data, bool on)
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
 		dev_err(&data->client->dev,
drivers/iio/accel/kxsd9.c +3 -3
index 70dfd6e354db..41dcf80784f1 100644
@@ -151,7 +151,7 @@ static int kxsd9_write_raw(struct iio_dev *indio_dev,
 	}
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return ret;
 }
@@ -199,7 +199,7 @@ static int kxsd9_read_raw(struct iio_dev *indio_dev,
 
 error_ret:
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return ret;
 };
@@ -251,7 +251,7 @@ static int kxsd9_buffer_postdisable(struct iio_dev *indio_dev)
 	struct kxsd9_state *st = iio_priv(indio_dev);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 }
drivers/iio/accel/mma8452.c +1 -1
index 62e6369e2269..17786868855b 100644
@@ -227,7 +227,7 @@ static int mma8452_set_runtime_pm_state(struct i2c_client *client, bool on)
 		ret = pm_runtime_resume_and_get(&client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&client->dev);
-		ret = pm_runtime_put_autosuspend(&client->dev);
+		ret = __pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	if (ret < 0) {
drivers/iio/accel/mma9551_core.c +1 -1
index b898f865fb87..d97cac6cc4da 100644
@@ -673,7 +673,7 @@ int mma9551_set_power_state(struct i2c_client *client, bool on)
 		ret = pm_runtime_resume_and_get(&client->dev);
 	else {
 		pm_runtime_mark_last_busy(&client->dev);
-		ret = pm_runtime_put_autosuspend(&client->dev);
+		ret = __pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	if (ret < 0) {
drivers/iio/accel/msa311.c +6 -6
index 57025354c7cd..21ec55dc1c5a 100644
@@ -608,7 +608,7 @@ static int msa311_read_raw_data(struct iio_dev *indio_dev,
 	iio_device_release_direct_mode(indio_dev);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err) {
 		dev_err(dev, "can't get axis %s (%pe)\n",
@@ -740,7 +740,7 @@ static int msa311_write_scale(struct iio_dev *indio_dev, int val, int val2)
 		}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err)
 		dev_err(dev, "can't update scale (%pe)\n", ERR_PTR(err));
@@ -781,7 +781,7 @@ static int msa311_write_samp_freq(struct iio_dev *indio_dev, int val, int val2)
 	iio_device_release_direct_mode(indio_dev);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err)
 		dev_err(dev, "can't update frequency (%pe)\n", ERR_PTR(err));
@@ -830,7 +830,7 @@ static int msa311_debugfs_reg_access(struct iio_dev *indio_dev,
 	mutex_unlock(&msa311->lock);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (err)
 		dev_err(dev, "can't %s register %u from debugfs (%pe)\n",
@@ -853,7 +853,7 @@ static int msa311_buffer_postdisable(struct iio_dev *indio_dev)
 	struct device *dev = msa311->dev;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -1231,7 +1231,7 @@ static int msa311_probe(struct i2c_client *i2c)
 		return err;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	err = devm_iio_device_register(dev, indio_dev);
 	if (err)
drivers/iio/adc/ab8500-gpadc.c +1 -1
index 59f66e9cb0e8..f2d1b06bac44 100644
@@ -608,7 +608,7 @@ static int ab8500_gpadc_read(struct ab8500_gpadc *gpadc,
 
 	/* This eventually drops the regulator */
 	pm_runtime_mark_last_busy(gpadc->dev);
-	pm_runtime_put_autosuspend(gpadc->dev);
+	__pm_runtime_put_autosuspend(gpadc->dev);
 
 	return (high_data << 8) | low_data;
 
drivers/iio/adc/at91-sama5d2_adc.c +10 -10
index d7fd21e7c6e2..628e6e3c667c 100644
@@ -893,7 +893,7 @@ static int at91_adc_config_emr(struct at91_adc_state *st,
 	at91_adc_writel(st, EMR, emr);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	st->oversampling_ratio = oversampling_ratio;
 
@@ -968,7 +968,7 @@ static int at91_adc_configure_touch(struct at91_adc_state *st, bool state)
 		at91_adc_writel(st, TSMR, 0);
 
 		pm_runtime_mark_last_busy(st->dev);
-		pm_runtime_put_autosuspend(st->dev);
+		__pm_runtime_put_autosuspend(st->dev);
 		return 0;
 	}
 	/*
@@ -1140,7 +1140,7 @@ static int at91_adc_configure_trigger(struct iio_trigger *trig, bool state)
 
 	if (!state) {
 		pm_runtime_mark_last_busy(st->dev);
-		pm_runtime_put_autosuspend(st->dev);
+		__pm_runtime_put_autosuspend(st->dev);
 	}
 
 	return 0;
@@ -1333,7 +1333,7 @@ static int at91_adc_buffer_prepare(struct iio_dev *indio_dev)
 
 pm_runtime_put:
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 	return ret;
 }
 
@@ -1391,7 +1391,7 @@ static int at91_adc_buffer_postdisable(struct iio_dev *indio_dev)
 		dmaengine_terminate_sync(st->dma_st.dma_chan);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 }
@@ -1600,7 +1600,7 @@ static void at91_adc_setup_samp_freq(struct iio_dev *indio_dev, unsigned freq,
 	at91_adc_writel(st, MR, mr);
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	dev_dbg(&indio_dev->dev, "freq: %u, startup: %u, prescal: %u, tracktim=%u\n",
 		freq, startup, prescal, tracktim);
@@ -1806,7 +1806,7 @@ static int at91_adc_read_info_raw(struct iio_dev *indio_dev,
 
 pm_runtime_put:
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 	return ret;
 }
 
@@ -1899,7 +1899,7 @@ static int at91_adc_read_temp(struct iio_dev *indio_dev,
 	/* Revert previous settings. */
 	at91_adc_temp_sensor_configure(st, false);
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 unlock:
 	mutex_unlock(&st->lock);
 	iio_device_release_direct_mode(indio_dev);
@@ -2467,7 +2467,7 @@ static int at91_adc_probe(struct platform_device *pdev)
 		 readl_relaxed(st->base + st->soc_info.platform->layout->VERSION));
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 
@@ -2569,7 +2569,7 @@ static int at91_adc_resume(struct device *dev)
 	}
 
 	pm_runtime_mark_last_busy(st->dev);
-	pm_runtime_put_autosuspend(st->dev);
+	__pm_runtime_put_autosuspend(st->dev);
 
 	return 0;
 
drivers/iio/adc/rcar-gyroadc.c +1 -1
index 15a21d2860e7..d2a4557a5c07 100644
@@ -167,7 +167,7 @@ static int rcar_gyroadc_set_power(struct rcar_gyroadc *priv, bool on)
 		return pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		return pm_runtime_put_autosuspend(dev);
+		return __pm_runtime_put_autosuspend(dev);
 	}
 }
 
drivers/iio/adc/stm32-adc-core.c +1 -1
index 616dd729666a..a67e972bcc5d 100644
@@ -798,7 +798,7 @@ static int stm32_adc_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/iio/adc/stm32-adc.c +6 -6
index 32ca26ed59f7..50c3651413d2 100644
@@ -1456,7 +1456,7 @@ static int stm32_adc_single_conv(struct iio_dev *indio_dev,
 	stm32_adc_conv_irq_disable(adc);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1623,7 +1623,7 @@ static int stm32_adc_update_scan_mode(struct iio_dev *indio_dev,
 
 	ret = stm32_adc_conf_scan_seq(indio_dev, scan_mask);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1672,7 +1672,7 @@ static int stm32_adc_debugfs_reg_access(struct iio_dev *indio_dev,
 		*readval = stm32_adc_readl(adc, reg);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -1816,7 +1816,7 @@ static int stm32_adc_buffer_postenable(struct iio_dev *indio_dev)
 	stm32_adc_set_trig(indio_dev, NULL);
 err_pm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1839,7 +1839,7 @@ static int stm32_adc_buffer_predisable(struct iio_dev *indio_dev)
 		dev_err(&indio_dev->dev, "Can't clear trigger\n");
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -2473,7 +2473,7 @@ static int stm32_adc_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (IS_ENABLED(CONFIG_DEBUG_FS))
 		stm32_adc_debugfs_init(indio_dev);
drivers/iio/adc/sun4i-gpadc-iio.c +2 -2
index 00a3a4db0fe0..43746e026042 100644
@@ -248,7 +248,7 @@ static int sun4i_gpadc_read(struct iio_dev *indio_dev, int channel, int *val,
 	pm_runtime_mark_last_busy(indio_dev->dev.parent);
 
 err:
-	pm_runtime_put_autosuspend(indio_dev->dev.parent);
+	__pm_runtime_put_autosuspend(indio_dev->dev.parent);
 	disable_irq(irq);
 	mutex_unlock(&info->mutex);
 
@@ -273,7 +273,7 @@ static int sun4i_gpadc_temp_read(struct iio_dev *indio_dev, int *val)
 		regmap_read(info->regmap, SUN4I_GPADC_TEMP_DATA, val);
 
 		pm_runtime_mark_last_busy(indio_dev->dev.parent);
-		pm_runtime_put_autosuspend(indio_dev->dev.parent);
+		__pm_runtime_put_autosuspend(indio_dev->dev.parent);
 
 		return 0;
 	}
drivers/iio/adc/ti-ads1015.c +1 -1
index 052d2124b215..380aeabc8a72 100644
@@ -377,7 +377,7 @@ static int ads1015_set_power_state(struct ads1015_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret < 0 ? ret : 0;
drivers/iio/adc/ti-ads1100.c +1 -1
index 1e46f07a9ca6..038901c93b7d 100644
@@ -105,7 +105,7 @@ static int ads1100_get_adc_result(struct ads1100_data *data, int chan, int *val)
 	ret = i2c_master_recv(data->client, (char *)&buffer, sizeof(buffer));
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 
 	if (ret < 0) {
 		dev_err(&data->client->dev, "I2C read fail: %d\n", ret);
drivers/iio/adc/ti-ads1119.c +2 -2
index 1c7606375149..52e20c4ed8bb 100644
@@ -292,7 +292,7 @@ static int ads1119_single_conversion(struct ads1119_state *st,
 	ret = IIO_VAL_INT;
 pdown:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
@@ -466,7 +466,7 @@ static int ads1119_triggered_buffer_postdisable(struct iio_dev *indio_dev)
 		return ret;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
drivers/iio/chemical/atlas-sensor.c +2 -2
index baf93e5e3ca7..d0ab2656919e 100644
@@ -427,7 +427,7 @@ static int atlas_buffer_predisable(struct iio_dev *indio_dev)
 		return ret;
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	ret = pm_runtime_put_autosuspend(&data->client->dev);
+	ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	if (ret)
 		return ret;
 
@@ -492,7 +492,7 @@ static int atlas_read_measurement(struct atlas_data *data, int reg, __be32 *val)
 	ret = regmap_bulk_read(data->regmap, reg, val, sizeof(*val));
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
drivers/iio/common/hid-sensors/hid-sensor-trigger.c +1 -1
index ad8910e6ad59..e6bf7eb4e23c 100644
@@ -165,7 +165,7 @@ int hid_sensor_power_state(struct hid_sensor_common *st, bool state)
 		atomic_dec(&st->user_requested_state);
 		pm_runtime_mark_last_busy(&st->pdev->dev);
 		pm_runtime_use_autosuspend(&st->pdev->dev);
-		ret = pm_runtime_put_autosuspend(&st->pdev->dev);
+		ret = __pm_runtime_put_autosuspend(&st->pdev->dev);
 	}
 	if (ret < 0)
 		return ret;
drivers/iio/dac/stm32-dac.c +3 -3
index 5a722f307e7e..8dadf90546b4 100644
@@ -97,7 +97,7 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
 
 	if (!enable) {
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 	return 0;
@@ -105,7 +105,7 @@ static int stm32_dac_set_enable_state(struct iio_dev *indio_dev, int ch,
 err_put_pm:
 	if (enable) {
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
@@ -350,7 +350,7 @@ static int stm32_dac_probe(struct platform_device *pdev)
 		goto err_pm_put;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/iio/gyro/bmg160_core.c +1 -1
index 10728d5ccae3..97f3045dc2a9 100644
@@ -314,7 +314,7 @@ static int bmg160_set_power_state(struct bmg160_data *data, bool on)
 		ret = pm_runtime_get_sync(dev);
 	else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	if (ret < 0) {
drivers/iio/gyro/fxas21002c_core.c +1 -1
index 688966129f70..f6263187f6c7 100644
@@ -375,7 +375,7 @@ static int  fxas21002c_pm_put(struct fxas21002c_data *data)
 
 	pm_runtime_mark_last_busy(dev);
 
-	return pm_runtime_put_autosuspend(dev);
+	return __pm_runtime_put_autosuspend(dev);
 }
 
 static int fxas21002c_temp_get(struct fxas21002c_data *data, int *val)
drivers/iio/gyro/mpu3050-core.c +3 -3
index b6883e8b2a8b..93d9d0e4626b 100644
@@ -371,7 +371,7 @@ static int mpu3050_read_raw(struct iio_dev *indio_dev,
 out_read_raw_unlock:
 	mutex_unlock(&mpu3050->lock);
 	pm_runtime_mark_last_busy(mpu3050->dev);
-	pm_runtime_put_autosuspend(mpu3050->dev);
+	__pm_runtime_put_autosuspend(mpu3050->dev);
 
 	return ret;
 }
@@ -663,7 +663,7 @@ static int mpu3050_buffer_postdisable(struct iio_dev *indio_dev)
 	struct mpu3050 *mpu3050 = iio_priv(indio_dev);
 
 	pm_runtime_mark_last_busy(mpu3050->dev);
-	pm_runtime_put_autosuspend(mpu3050->dev);
+	__pm_runtime_put_autosuspend(mpu3050->dev);
 
 	return 0;
 }
@@ -977,7 +977,7 @@ static int mpu3050_drdy_trigger_set_state(struct iio_trigger *trig,
 			dev_err(mpu3050->dev, "error resetting FIFO\n");
 
 		pm_runtime_mark_last_busy(mpu3050->dev);
-		pm_runtime_put_autosuspend(mpu3050->dev);
+		__pm_runtime_put_autosuspend(mpu3050->dev);
 		mpu3050->hw_irq_trigger = false;
 
 		return 0;
drivers/iio/gyro/mpu3050-i2c.c +1 -1
index 29ecfa6fd633..49256fc6c6ad 100644
@@ -28,7 +28,7 @@ static int mpu3050_i2c_bypass_deselect(struct i2c_mux_core *mux, u32 chan_id)
 	struct mpu3050 *mpu3050 = i2c_mux_priv(mux);
 
 	pm_runtime_mark_last_busy(mpu3050->dev);
-	pm_runtime_put_autosuspend(mpu3050->dev);
+	__pm_runtime_put_autosuspend(mpu3050->dev);
 	return 0;
 }
 
drivers/iio/imu/inv_icm42600/inv_icm42600_accel.c +5 -5
index 56ac19814250..4e43deadf02f 100644
@@ -292,7 +292,7 @@ static int inv_icm42600_accel_read_sensor(struct iio_dev *indio_dev,
 exit:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
@@ -370,7 +370,7 @@ static int inv_icm42600_accel_write_scale(struct iio_dev *indio_dev,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -474,7 +474,7 @@ static int inv_icm42600_accel_write_odr(struct iio_dev *indio_dev,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -526,7 +526,7 @@ static int inv_icm42600_accel_read_offset(struct inv_icm42600_state *st,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	if (ret)
 		return ret;
 
@@ -664,7 +664,7 @@ static int inv_icm42600_accel_write_offset(struct inv_icm42600_state *st,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
drivers/iio/imu/inv_icm42600/inv_icm42600_buffer.c +1 -1
index aae7c56481a3..acc141657d3f 100644
@@ -440,7 +440,7 @@ static int inv_icm42600_buffer_postdisable(struct iio_dev *indio_dev)
 		msleep(sleep);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
drivers/iio/imu/inv_icm42600/inv_icm42600_gyro.c +5 -5
index 938af5b640b0..3784b1719433 100644
@@ -188,7 +188,7 @@ static int inv_icm42600_gyro_read_sensor(struct inv_icm42600_state *st,
 exit:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
@@ -287,7 +287,7 @@ static int inv_icm42600_gyro_write_scale(struct iio_dev *indio_dev,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -382,7 +382,7 @@ static int inv_icm42600_gyro_write_odr(struct iio_dev *indio_dev,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -434,7 +434,7 @@ static int inv_icm42600_gyro_read_offset(struct inv_icm42600_state *st,
 
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	if (ret)
 		return ret;
 
@@ -571,7 +571,7 @@ static int inv_icm42600_gyro_write_offset(struct inv_icm42600_state *st,
 out_unlock:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
drivers/iio/imu/inv_icm42600/inv_icm42600_temp.c +1 -1
index 213cce1c3111..4c2f2d6dfff9 100644
@@ -38,7 +38,7 @@ static int inv_icm42600_temp_read(struct inv_icm42600_state *st, int16_t *temp)
 exit:
 	mutex_unlock(&st->lock);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
drivers/iio/imu/inv_mpu6050/inv_mpu_core.c +7 -7
index fdb48c5e5686..8fb35f37e5d2 100644
@@ -708,12 +708,12 @@ static int inv_mpu6050_read_channel_data(struct iio_dev *indio_dev,
 	}
 
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 
 	return ret;
 
 error_power_off:
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 	return result;
 }
 
@@ -913,7 +913,7 @@ static int inv_mpu6050_write_raw(struct iio_dev *indio_dev,
 	}
 
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 error_write_raw_unlock:
 	mutex_unlock(&st->lock);
 	iio_device_release_direct_mode(indio_dev);
@@ -1121,14 +1121,14 @@ static int inv_mpu6050_enable_wom(struct inv_mpu6050_state *st, bool en)
 		}
 
 		pm_runtime_mark_last_busy(pdev);
-		pm_runtime_put_autosuspend(pdev);
+		__pm_runtime_put_autosuspend(pdev);
 	}
 
 	return result;
 
 error_suspend:
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 	return result;
 }
 
@@ -1227,7 +1227,7 @@ static int inv_mpu6050_write_event_value(struct iio_dev *indio_dev,
 	result = inv_mpu6050_set_wom_threshold(st, value, INV_MPU6050_FREQ_DIVIDER(st));
 
 	pm_runtime_mark_last_busy(pdev);
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 
 	return result;
 }
@@ -1336,7 +1336,7 @@ inv_mpu6050_fifo_rate_store(struct device *dev, struct device_attribute *attr,
 
 	pm_runtime_mark_last_busy(pdev);
 fifo_rate_fail_power_off:
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 fifo_rate_fail_unlock:
 	mutex_unlock(&st->lock);
 	if (result)
drivers/iio/imu/inv_mpu6050/inv_mpu_trigger.c +2 -2
index 3bfeabab0ec4..e501ac9276d4 100644
@@ -196,13 +196,13 @@ static int inv_mpu6050_set_enable(struct iio_dev *indio_dev, bool enable)
 		if (result)
 			goto error_power_off;
 		pm_runtime_mark_last_busy(pdev);
-		pm_runtime_put_autosuspend(pdev);
+		__pm_runtime_put_autosuspend(pdev);
 	}
 
 	return 0;
 
 error_power_off:
-	pm_runtime_put_autosuspend(pdev);
+	__pm_runtime_put_autosuspend(pdev);
 	return result;
 }
 
drivers/iio/imu/kmx61.c +1 -1
index c61c012e25bb..75942b0b95d7 100644
@@ -753,7 +753,7 @@ static int kmx61_set_power_state(struct kmx61_data *data, bool on, u8 device)
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
 		dev_err(&data->client->dev,
drivers/iio/light/apds9306.c +3 -3
index 079e02be1005..ade25e461397 100644
@@ -538,7 +538,7 @@ static int apds9306_read_data(struct apds9306_data *data, int *val, int reg)
 	*val = get_unaligned_le24(&buff);
 
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
 }
@@ -1119,7 +1119,7 @@ static int apds9306_write_event_config(struct iio_dev *indio_dev,
 				return ret;
 
 			pm_runtime_mark_last_busy(data->dev);
-			pm_runtime_put_autosuspend(data->dev);
+			__pm_runtime_put_autosuspend(data->dev);
 
 			return 0;
 		}
@@ -1315,7 +1315,7 @@ static int apds9306_probe(struct i2c_client *client)
 	if (ret)
 		return dev_err_probe(dev, ret, "failed iio device registration\n");
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
drivers/iio/light/apds9960.c +2 -2
index 3c14e4c30805..13db160be094 100644
@@ -497,7 +497,7 @@ static int apds9960_set_power_state(struct apds9960_data *data, bool on)
 				     APDS9960_MAX_INT_TIME_IN_US);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	mutex_unlock(&data->lock);
@@ -910,7 +910,7 @@ static int apds9960_buffer_predisable(struct iio_dev *indio_dev)
 	if (ret)
 		return ret;
 
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 
 	return 0;
 }
drivers/iio/light/bh1780.c +1 -1
index 475f44954f61..d22bf5f684b1 100644
@@ -112,7 +112,7 @@ static int bh1780_read_raw(struct iio_dev *indio_dev,
 			if (value < 0)
 				return value;
 			pm_runtime_mark_last_busy(&bh1780->client->dev);
-			pm_runtime_put_autosuspend(&bh1780->client->dev);
+			__pm_runtime_put_autosuspend(&bh1780->client->dev);
 			*val = value;
 
 			return IIO_VAL_INT;
drivers/iio/light/gp2ap002.c +2 -2
index f8b1d7dd6f5f..aeaba841dbb4 100644
@@ -272,7 +272,7 @@ static int gp2ap002_read_raw(struct iio_dev *indio_dev,
 
 out:
 	pm_runtime_mark_last_busy(gp2ap002->dev);
-	pm_runtime_put_autosuspend(gp2ap002->dev);
+	__pm_runtime_put_autosuspend(gp2ap002->dev);
 
 	return ret;
 }
@@ -354,7 +354,7 @@ static int gp2ap002_write_event_config(struct iio_dev *indio_dev,
 		gp2ap002->enabled = true;
 	} else {
 		pm_runtime_mark_last_busy(gp2ap002->dev);
-		pm_runtime_put_autosuspend(gp2ap002->dev);
+		__pm_runtime_put_autosuspend(gp2ap002->dev);
 		gp2ap002->enabled = false;
 	}
 
drivers/iio/light/isl29028.c +1 -1
index 95bfb3ffa519..63b6fdda25ed 100644
@@ -342,7 +342,7 @@ static int isl29028_set_pm_runtime_busy(struct isl29028_chip *chip, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
drivers/iio/light/ltrf216a.c +1 -1
index 37eecff571b9..228f03c7f192 100644
@@ -209,7 +209,7 @@ static int ltrf216a_set_power_state(struct ltrf216a_data *data, bool on)
 		}
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
drivers/iio/light/pa12203001.c +1 -1
index b920bf82c102..38313e712e65 100644
@@ -190,7 +190,7 @@ static int pa12203001_set_power_state(struct pa12203001_data *data, bool on,
 
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 
 	return ret;
drivers/iio/light/rpr0521.c +1 -1
index 78c08e0bd077..2010b6387be7 100644
@@ -363,7 +363,7 @@ static int rpr0521_set_power_state(struct rpr0521_data *data, bool on,
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 	if (ret < 0) {
 		dev_err(&data->client->dev,
drivers/iio/light/tsl2583.c +1 -1
index 02ad11611b9c..d41fd79e724c 100644
@@ -647,7 +647,7 @@ static int tsl2583_set_pm_runtime_busy(struct tsl2583_chip *chip, bool on)
 		ret = pm_runtime_resume_and_get(&chip->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&chip->client->dev);
-		ret = pm_runtime_put_autosuspend(&chip->client->dev);
+		ret = __pm_runtime_put_autosuspend(&chip->client->dev);
 	}
 
 	return ret;
drivers/iio/light/tsl2591.c +2 -2
index 850c2465992f..43adaffe1400 100644
@@ -773,7 +773,7 @@ static int tsl2591_read_raw(struct iio_dev *indio_dev,
 	mutex_unlock(&chip->als_mutex);
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 }
@@ -996,7 +996,7 @@ static int tsl2591_write_event_config(struct iio_dev *indio_dev,
 	} else if (!state && chip->events_enabled) {
 		chip->events_enabled = false;
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	return 0;
drivers/iio/light/us5182d.c +1 -1
index de6967ac3b0b..901288236d38 100644
@@ -370,7 +370,7 @@ static int us5182d_set_power_state(struct us5182d_data *data, bool on)
 		ret = pm_runtime_resume_and_get(&data->client->dev);
 	} else {
 		pm_runtime_mark_last_busy(&data->client->dev);
-		ret = pm_runtime_put_autosuspend(&data->client->dev);
+		ret = __pm_runtime_put_autosuspend(&data->client->dev);
 	}
 
 	return ret;
drivers/iio/light/vcnl4000.c +1 -1
index 4e3641ff2ed4..2877880897e4 100644
@@ -582,7 +582,7 @@ static int vcnl4000_set_pm_runtime_state(struct vcnl4000_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
drivers/iio/light/vcnl4035.c +1 -1
index 337a1332c2c6..a7393255f6ac 100644
@@ -150,7 +150,7 @@ static int vcnl4035_set_pm_runtime_state(struct vcnl4035_data *data, bool on)
 		ret = pm_runtime_resume_and_get(dev);
 	} else {
 		pm_runtime_mark_last_busy(dev);
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
drivers/iio/magnetometer/af8133j.c +2 -2
index d81d89af6283..f0530854698d 100644
@@ -235,7 +235,7 @@ static int af8133j_read_measurement(struct af8133j_data *data, __le16 buf[3])
 
 out_rpm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -454,7 +454,7 @@ static int af8133j_probe(struct i2c_client *client)
 	if (ret)
 		return ret;
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	indio_dev->info = &af8133j_info;
 	indio_dev->name = "af8133j";
drivers/iio/magnetometer/ak8974.c +2 -2
index 8306a18706ac..eed25cd701f0 100644
@@ -584,7 +584,7 @@ static int ak8974_measure_channel(struct ak8974 *ak8974, unsigned long address,
 out_unlock:
 	mutex_unlock(&ak8974->lock);
 	pm_runtime_mark_last_busy(&ak8974->i2c->dev);
-	pm_runtime_put_autosuspend(&ak8974->i2c->dev);
+	__pm_runtime_put_autosuspend(&ak8974->i2c->dev);
 
 	return ret;
 }
@@ -679,7 +679,7 @@ static void ak8974_fill_buffer(struct iio_dev *indio_dev)
  out_unlock:
 	mutex_unlock(&ak8974->lock);
 	pm_runtime_mark_last_busy(&ak8974->i2c->dev);
-	pm_runtime_put_autosuspend(&ak8974->i2c->dev);
+	__pm_runtime_put_autosuspend(&ak8974->i2c->dev);
 }
 
 static irqreturn_t ak8974_handle_trigger(int irq, void *p)
drivers/iio/magnetometer/ak8975.c +1 -1
index 18077fb463a9..b637385f9d26 100644
@@ -776,7 +776,7 @@ static int ak8975_read_axis(struct iio_dev *indio_dev, int index, int *val)
 	mutex_unlock(&data->lock);
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 
 	/* Swap bytes and convert to valid range. */
 	buff = le16_to_cpu(rval);
drivers/iio/magnetometer/bmc150_magn.c +1 -1
index 06d5a1ef1fbd..26dc68e4270d 100644
@@ -268,7 +268,7 @@ static int bmc150_magn_set_power_state(struct bmc150_magn_data *data, bool on)
 		ret = pm_runtime_resume_and_get(data->dev);
 	} else {
 		pm_runtime_mark_last_busy(data->dev);
-		ret = pm_runtime_put_autosuspend(data->dev);
+		ret = __pm_runtime_put_autosuspend(data->dev);
 	}
 
 	if (ret < 0) {
drivers/iio/magnetometer/tmag5273.c +2 -2
index 4187abe12784..bec579b7c6c6 100644
@@ -296,7 +296,7 @@ static int tmag5273_read_raw(struct iio_dev *indio_dev,
 		ret = tmag5273_get_measure(data, &t, &x, &y, &z, &angle, &magnitude);
 
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 
 		if (ret)
 			return ret;
@@ -669,7 +669,7 @@ static int tmag5273_probe(struct i2c_client *i2c)
 	indio_dev->num_channels = ARRAY_SIZE(tmag5273_channels);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	ret = devm_iio_device_register(dev, indio_dev);
 	if (ret)
drivers/iio/magnetometer/yamaha-yas530.c +2 -2
index 65011a8598d3..62df8b91df3a 100644
@@ -623,7 +623,7 @@ static int yas5xx_read_raw(struct iio_dev *indio_dev,
 		pm_runtime_get_sync(yas5xx->dev);
 		ret = ci->get_measure(yas5xx, &t, &x, &y, &z);
 		pm_runtime_mark_last_busy(yas5xx->dev);
-		pm_runtime_put_autosuspend(yas5xx->dev);
+		__pm_runtime_put_autosuspend(yas5xx->dev);
 		if (ret)
 			return ret;
 		switch (chan->address) {
@@ -664,7 +664,7 @@ static void yas5xx_fill_buffer(struct iio_dev *indio_dev)
 	pm_runtime_get_sync(yas5xx->dev);
 	ret = ci->get_measure(yas5xx, &t, &x, &y, &z);
 	pm_runtime_mark_last_busy(yas5xx->dev);
-	pm_runtime_put_autosuspend(yas5xx->dev);
+	__pm_runtime_put_autosuspend(yas5xx->dev);
 	if (ret) {
 		dev_err(yas5xx->dev, "error refilling buffer\n");
 		return;
drivers/iio/pressure/bmp280-core.c +5 -5
index ca4915c9a394..806933baeffd 100644
@@ -729,7 +729,7 @@ static int bmp280_read_raw(struct iio_dev *indio_dev,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp280_read_raw_impl(indio_dev, chan, val, val2, mask);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -904,7 +904,7 @@ static int bmp280_write_raw(struct iio_dev *indio_dev,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp280_write_raw_impl(indio_dev, chan, val, val2, mask);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -1960,7 +1960,7 @@ static int bmp580_nvmem_read(void *priv, unsigned int offset, void *val,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp580_nvmem_read_impl(priv, offset, val, bytes);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -2035,7 +2035,7 @@ static int bmp580_nvmem_write(void *priv, unsigned int offset, void *val,
 	pm_runtime_get_sync(data->dev);
 	ret = bmp580_nvmem_write_impl(priv, offset, val, bytes);
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
@@ -2641,7 +2641,7 @@ static int bmp280_buffer_postdisable(struct iio_dev *indio_dev)
 	struct bmp280_data *data = iio_priv(indio_dev);
 
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
 }
drivers/iio/pressure/icp10100.c +1 -1
index 3e0bf5d31ad7..866381bb1452 100644
@@ -267,7 +267,7 @@ static int icp10100_get_measures(struct icp10100_state *st,
 
 	pm_runtime_mark_last_busy(&st->client->dev);
 error_measure:
-	pm_runtime_put_autosuspend(&st->client->dev);
+	__pm_runtime_put_autosuspend(&st->client->dev);
 	return ret;
 }
 
drivers/iio/pressure/mpl115.c +2 -2
index 02ea38c8a3e4..70b711b16e52 100644
@@ -109,7 +109,7 @@ static int mpl115_read_raw(struct iio_dev *indio_dev,
 		if (ret < 0)
 			return ret;
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 
 		return IIO_VAL_INT_PLUS_MICRO;
 	case IIO_CHAN_INFO_RAW:
@@ -119,7 +119,7 @@ static int mpl115_read_raw(struct iio_dev *indio_dev,
 		if (ret < 0)
 			return ret;
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 		*val = ret >> 6;
 
 		return IIO_VAL_INT;
drivers/iio/pressure/zpa2326.c +2 -2
index 950f8dee2b26..7274855d0297 100644
@@ -698,7 +698,7 @@ static void zpa2326_suspend(struct iio_dev *indio_dev)
 	zpa2326_sleep(indio_dev);
 
 	pm_runtime_mark_last_busy(parent);
-	pm_runtime_put_autosuspend(parent);
+	__pm_runtime_put_autosuspend(parent);
 }
 
 static void zpa2326_init_runtime(struct device *parent)
@@ -709,7 +709,7 @@ static void zpa2326_init_runtime(struct device *parent)
 	pm_runtime_set_autosuspend_delay(parent, 1000);
 	pm_runtime_use_autosuspend(parent);
 	pm_runtime_mark_last_busy(parent);
-	pm_runtime_put_autosuspend(parent);
+	__pm_runtime_put_autosuspend(parent);
 }
 
 static void zpa2326_fini_runtime(struct device *parent)
drivers/iio/proximity/pulsedlight-lidar-lite-v2.c +1 -1
index 5c959730aecd..6be27497d6e3 100644
@@ -192,7 +192,7 @@ static int lidar_get_measurement(struct lidar_data *data, u16 *reg)
 		ret = -EIO;
 	}
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 }
drivers/iio/proximity/srf04.c +1 -1
index 86c57672fc7e..ecea2671ce62 100644
@@ -119,7 +119,7 @@ static int srf04_read(struct srf04_data *data)
 
 	if (data->gpiod_power) {
 		pm_runtime_mark_last_busy(data->dev);
-		pm_runtime_put_autosuspend(data->dev);
+		__pm_runtime_put_autosuspend(data->dev);
 	}
 
 	/* it should not take more than 20 ms until echo is rising */
drivers/iio/temperature/mlx90614.c +2 -2
index 740018d4b3df..22bed79589d1 100644
@@ -212,7 +212,7 @@ static int mlx90614_power_get(struct mlx90614_data *data, bool startup)
 		if (time_before(now, data->ready_timestamp) &&
 		    msleep_interruptible(jiffies_to_msecs(
 				data->ready_timestamp - now)) != 0) {
-			pm_runtime_put_autosuspend(&data->client->dev);
+			__pm_runtime_put_autosuspend(&data->client->dev);
 			return -EINTR;
 		}
 	}
@@ -226,7 +226,7 @@ static void mlx90614_power_put(struct mlx90614_data *data)
 		return;
 
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 }
 #else
 static inline int mlx90614_power_get(struct mlx90614_data *data, bool startup)
drivers/iio/temperature/mlx90632.c +2 -2
index ae4ea587e7f9..c8cea6a4f390 100644
@@ -1044,7 +1044,7 @@ static int mlx90632_read_raw(struct iio_dev *indio_dev,
 
 mlx90632_read_raw_pm:
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 	return ret;
 }
 
@@ -1273,7 +1273,7 @@ static int mlx90632_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, MLX90632_SLEEP_DELAY_MS);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return devm_iio_device_register(&client->dev, indio_dev);
 }
drivers/iio/temperature/mlx90635.c +2 -2
index f7f88498ba0e..77ea81aa5c9e 100644
@@ -750,7 +750,7 @@ static int mlx90635_read_raw(struct iio_dev *indio_dev,
 
 mlx90635_read_raw_pm:
 	pm_runtime_mark_last_busy(&data->client->dev);
-	pm_runtime_put_autosuspend(&data->client->dev);
+	__pm_runtime_put_autosuspend(&data->client->dev);
 	return ret;
 }
 
@@ -1023,7 +1023,7 @@ static int mlx90635_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, MLX90635_SLEEP_DELAY_MS);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return devm_iio_device_register(&client->dev, indio_dev);
 }
author maintainer
#25 lore raw

PATCH 20/51 Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/input/keyboard/omap4-keypad.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/input/keyboard/omap4-keypad.c +4 -4
index 040b340995d8..cc8d77601fc7 100644
@@ -196,7 +196,7 @@ static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id)
 			 kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return IRQ_HANDLED;
 }
@@ -234,7 +234,7 @@ static int omap4_keypad_open(struct input_dev *input)
 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return error;
 }
@@ -268,7 +268,7 @@ static void omap4_keypad_close(struct input_dev *input)
 	clk_disable_unprepare(keypad_data->fck);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static int omap4_keypad_parse_dt(struct device *dev,
@@ -407,7 +407,7 @@ static int omap4_keypad_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	if (error)
 		return error;
 
Signature · 1 line
2.39.5
maintainer
#26 lore raw

Re: [PATCH 20/51] Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()

Am Fri, 4 Oct 2024 12:41:23 +0300
schrieb Sakari Ailus <[email protected]>:

Quoted 24 lines

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/input/keyboard/omap4-keypad.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/input/keyboard/omap4-keypad.c index 040b340995d8..cc8d77601fc7 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -196,7 +196,7 @@ static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id) kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));

drivers/input/keyboard/omap4-keypad.c +1 -1
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return IRQ_HANDLED;
 }

drivers/input/keyboard/omap4-keypad.c static int omap4_keypad_open(struct input_dev · line 238

Quoted 6 lines
drivers/input/keyboard/omap4-keypad.c +1 -1
@@ -234,7 +234,7 @@ static int omap4_keypad_open(struct input_dev
 *input) 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 

hmm, if pm_runtime_put_autosuspend() will include the call to pm_runtime_mark_last_busy(), then why is this change needed? After the change, the mark_last_busy could be removed.

Regards,
Andreas

author maintainer
#27 lore raw

Re: [PATCH 20/51] Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()

Hi Andreas,

Quoted 24 lines · Andreas Kemnade

Am Fri, 4 Oct 2024 12:41:23 +0300
schrieb Sakari Ailus <[email protected]>:

Quoted 21 lines

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/input/keyboard/omap4-keypad.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/input/keyboard/omap4-keypad.c index 040b340995d8..cc8d77601fc7 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -196,7 +196,7 @@ static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id) kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));

drivers/input/keyboard/omap4-keypad.c +1 -1
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
Quoted 12 lines

drivers/input/keyboard/omap4-keypad.c static int omap4_keypad_open(struct input_dev · line 238

Quoted 9 lines
drivers/input/keyboard/omap4-keypad.c +1 -1
 	return IRQ_HANDLED;
 }
@@ -234,7 +234,7 @@ static int omap4_keypad_open(struct input_dev
 *input) 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 

hmm, if pm_runtime_put_autosuspend() will include the call to pm_runtime_mark_last_busy(), then why is this change needed? After the change, the mark_last_busy could be removed.

It could, in which case we'd be living with pm_runtime_mark_last_busy() called twice, for some time, and for some code, possibly even in a release kernel, depending on how well the patches "stick". It likely wouldn't be harmful. Still, to avoid making functional changes to more than 350 files I know little about, I've instead posted this set to prepare for pm_runtime_put_autosuspend() functionality change while keeping the functionality of the code exactly the same.

Also added Ilpo who had a similar question.

Signature · 3 lines
Kidn regards,

Sakari Ailus
maintainer Reviewed-by
#28 lore raw

Re: [PATCH 20/51] Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()

Am Fri, 4 Oct 2024 10:26:42 +0000
schrieb Sakari Ailus <[email protected]>:

Quoted 50 lines

Hi Andreas,

Quoted 25 lines · Andreas Kemnade

Am Fri, 4 Oct 2024 12:41:23 +0300
schrieb Sakari Ailus <[email protected]>:

Quoted 22 lines

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/input/keyboard/omap4-keypad.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/input/keyboard/omap4-keypad.c index 040b340995d8..cc8d77601fc7 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -196,7 +196,7 @@ static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id) kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));

drivers/input/keyboard/omap4-keypad.c +1 -1
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
Quoted 12 lines

drivers/input/keyboard/omap4-keypad.c static int omap4_keypad_open(struct input_dev · line 238

Quoted 9 lines
drivers/input/keyboard/omap4-keypad.c +1 -1
 	return IRQ_HANDLED;
 }
@@ -234,7 +234,7 @@ static int omap4_keypad_open(struct input_dev
 *input) 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 

hmm, if pm_runtime_put_autosuspend() will include the call to pm_runtime_mark_last_busy(), then why is this change needed? After the change, the mark_last_busy could be removed.

It could, in which case we'd be living with pm_runtime_mark_last_busy() called twice, for some time, and for some code, possibly even in a release kernel, depending on how well the patches "stick". It likely wouldn't be harmful. Still, to avoid making functional changes to more than 350 files I know little about, I've instead posted this set to prepare for pm_runtime_put_autosuspend() functionality change while keeping the functionality of the code exactly the same.

Quoted 2 lines

Also added Ilpo who had a similar question.

Ah, ok, I did not get the cover letter.

Quoted 3 lines

Once this conversion is done and pm_runtime_put_autosuspend() re-purposed, I'll post another set to merge the calls to __pm_runtime_put_autosuspend() and pm_runtime_mark_last_busy()

with that all this makes sense to me. So:

maintainer
#29 lore raw

Re: [PATCH 20/51] Input: omap4-keypad: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

Hi Sakari,

Quoted 40 lines · Sakari Ailus

Hi Andreas,

Quoted 24 lines · Andreas Kemnade

Am Fri, 4 Oct 2024 12:41:23 +0300
schrieb Sakari Ailus <[email protected]>:

Quoted 21 lines

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/input/keyboard/omap4-keypad.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
(quoted diff) +0 -0

b/drivers/input/keyboard/omap4-keypad.c index 040b340995d8..cc8d77601fc7 100644 --- a/drivers/input/keyboard/omap4-keypad.c +++ b/drivers/input/keyboard/omap4-keypad.c @@ -196,7 +196,7 @@ static irqreturn_t omap4_keypad_irq_thread_fn(int irq, void *dev_id) kbd_read_irqreg(keypad_data, OMAP4_KBD_IRQSTATUS));

drivers/input/keyboard/omap4-keypad.c +1 -1
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
Quoted 12 lines

drivers/input/keyboard/omap4-keypad.c static int omap4_keypad_open(struct input_dev · line 238

Quoted 9 lines
drivers/input/keyboard/omap4-keypad.c +1 -1
 	return IRQ_HANDLED;
 }
@@ -234,7 +234,7 @@ static int omap4_keypad_open(struct input_dev
 *input) 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 

hmm, if pm_runtime_put_autosuspend() will include the call to pm_runtime_mark_last_busy(), then why is this change needed? After the change, the mark_last_busy could be removed.

Quoted 7 lines

It could, in which case we'd be living with pm_runtime_mark_last_busy() called twice, for some time, and for some code, possibly even in a release kernel, depending on how well the patches "stick". It likely wouldn't be harmful. Still, to avoid making functional changes to more than 350 files I know little about, I've instead posted this set to prepare for pm_runtime_put_autosuspend() functionality change while keeping the functionality of the code exactly the same.

pm_runtime_mark_last_busy() is pretty cheap (it fetches current time and stores it in the device power-related structure), so doing it twice back-to-back should not be a problem.

I would prefer what Andreas suggested in the first place: remove call to pm_runtime_mark_last_busy() once pm_runtime_put_autosuspend() does it for us. I'd be OK with such change being merged through the same tree that changes to pm_runtime_put_autosuspend() will be merged through.

Thanks.

Signature · 1 line
Dmitry
author maintainer
#30 lore raw

PATCH 21/51 Input: cs40l50: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/input/misc/cs40l50-vibra.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/input/misc/cs40l50-vibra.c +4 -4
index 03bdb7c26ec0..8555f0d93d3f 100644
@@ -307,7 +307,7 @@ static void cs40l50_add_worker(struct work_struct *work)
 	}
 err_pm:
 	pm_runtime_mark_last_busy(vib->dev);
-	pm_runtime_put_autosuspend(vib->dev);
+	__pm_runtime_put_autosuspend(vib->dev);
 err_exit:
 	work_data->error = error;
 }
@@ -366,7 +366,7 @@ static void cs40l50_start_worker(struct work_struct *work)
 	}
 
 	pm_runtime_mark_last_busy(vib->dev);
-	pm_runtime_put_autosuspend(vib->dev);
+	__pm_runtime_put_autosuspend(vib->dev);
 err_free:
 	kfree(work_data);
 }
@@ -382,7 +382,7 @@ static void cs40l50_stop_worker(struct work_struct *work)
 	vib->dsp.write(vib->dev, vib->regmap, vib->dsp.stop_cmd);
 
 	pm_runtime_mark_last_busy(vib->dev);
-	pm_runtime_put_autosuspend(vib->dev);
+	__pm_runtime_put_autosuspend(vib->dev);
 
 	kfree(work_data);
 }
@@ -454,7 +454,7 @@ static void cs40l50_erase_worker(struct work_struct *work)
 	kfree(erase_effect);
 err_pm:
 	pm_runtime_mark_last_busy(vib->dev);
-	pm_runtime_put_autosuspend(vib->dev);
+	__pm_runtime_put_autosuspend(vib->dev);
 err_exit:
 	work_data->error = error;
 }
Signature · 1 line
2.39.5
maintainer
#31 lore raw

Re: [PATCH 21/51] Input: cs40l50: Switch to __pm_runtime_put_autosuspend()

Quoted 15 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/input/misc/cs40l50-vibra.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/input/misc/cs40l50-vibra.c +0 -0
index 03bdb7c26ec0..8555f0d93d3f 100644

drivers/input/misc/cs40l50-vibra.c static void cs40l50_add_worker(struct work_struct *work) · line 310

Quoted 5 lines
drivers/input/misc/cs40l50-vibra.c +1 -1
@@ -307,7 +307,7 @@ static void cs40l50_add_worker(struct work_struct *work)
 	}
 err_pm:
 	pm_runtime_mark_last_busy(vib->dev);
-	pm_runtime_put_autosuspend(vib->dev);
+	__pm_runtime_put_autosuspend(vib->dev);

Same comment as with omap4 keypad: prefer to simply remove pm_runtime_mark_last_busy() once pm_runtime_put_autosuspend() does this for us.

Thanks.

Signature · 1 line
Dmitry
author maintainer
#32 lore raw

PATCH 22/51 iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm/arm-smmu/arm-smmu.c +1 -1
index 8321962b3714..cad02d5dc6d2 100644
@@ -79,7 +79,7 @@ static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
 static inline void arm_smmu_rpm_put(struct arm_smmu_device *smmu)
 {
 	if (pm_runtime_enabled(smmu->dev))
-		pm_runtime_put_autosuspend(smmu->dev);
+		__pm_runtime_put_autosuspend(smmu->dev);
 }
 
 static void arm_smmu_rpm_use_autosuspend(struct arm_smmu_device *smmu)
Signature · 1 line
2.39.5
Reviewed-by on v1 22/51
#33 lore raw

Re: [PATCH 22/51] iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()

Quoted 15 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm/arm-smmu/arm-smmu.c +0 -0
index 8321962b3714..cad02d5dc6d2 100644

drivers/iommu/arm/arm-smmu/arm-smmu.c static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu) · line 83

Quoted 6 lines
drivers/iommu/arm/arm-smmu/arm-smmu.c +1 -1
@@ -79,7 +79,7 @@ static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
 static inline void arm_smmu_rpm_put(struct arm_smmu_device *smmu)
 {
 	if (pm_runtime_enabled(smmu->dev))
-		pm_runtime_put_autosuspend(smmu->dev);
+		__pm_runtime_put_autosuspend(smmu->dev);
 }

Seems like a straightforward change as a result of [1]. Although, I had a few things to discuss:

1. The rpm_resume in drivers/base/power/runtime.c seems to call pm_runtime_mark_last_busy in case the ->runtime_resume callback returned successfully. In such a case, why would we want to move pm_runtime_mark_last_busy within pm_runtime_put_autosuspend ?

2. In the arm-smmu driver, we seem to rely on the rpm_resume to call pm_runtime_mark_last_busy as a part of the ->runtime_resume callback. The only other case, where we might wanna *mark_last_busy is if we want the autosuspend timer to be re-started in case of a failed suspend. However, the arm_smmu_runtime_suspend doesn't return errno in any case hence, I don't see any other case where we'd benefit from using mark_last_busy in the arm-smmu driver.

On the other hand, I don't see a problem with using it either :) Any thoughts Will/Rob/Robin?

Quoted 5 lines
drivers/iommu/arm/arm-smmu/arm-smmu.c +0 -0
 static void arm_smmu_rpm_use_autosuspend(struct arm_smmu_device *smmu)
Signature · 1 line
2.39.5

Apart from the above discussion, for this patch alone:

Thanks,
Pranjal

[1]
https://lore.kernel.org/all/[email protected]/

maintainer
#34 lore raw

Re: [PATCH 22/51] iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()

Quoted 39 lines · Pranjal Shrivastava
Quoted 15 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm/arm-smmu/arm-smmu.c +0 -0
index 8321962b3714..cad02d5dc6d2 100644

drivers/iommu/arm/arm-smmu/arm-smmu.c static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu) · line 83

Quoted 6 lines
drivers/iommu/arm/arm-smmu/arm-smmu.c +1 -1
@@ -79,7 +79,7 @@ static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
 static inline void arm_smmu_rpm_put(struct arm_smmu_device *smmu)
 {
 	if (pm_runtime_enabled(smmu->dev))
-		pm_runtime_put_autosuspend(smmu->dev);
+		__pm_runtime_put_autosuspend(smmu->dev);
 }

Seems like a straightforward change as a result of [1]. Although, I had a few things to discuss:

1. The rpm_resume in drivers/base/power/runtime.c seems to call pm_runtime_mark_last_busy in case the ->runtime_resume callback returned successfully. In such a case, why would we want to move pm_runtime_mark_last_busy within pm_runtime_put_autosuspend ?

2. In the arm-smmu driver, we seem to rely on the rpm_resume to call pm_runtime_mark_last_busy as a part of the ->runtime_resume callback. The only other case, where we might wanna *mark_last_busy is if we want the autosuspend timer to be re-started in case of a failed suspend. However, the arm_smmu_runtime_suspend doesn't return errno in any case hence, I don't see any other case where we'd benefit from using mark_last_busy in the arm-smmu driver.

Quoted 2 lines

On the other hand, I don't see a problem with using it either :) Any thoughts Will/Rob/Robin?

To be honest, I think the current driver code is pretty weird. We're calling arm_smmu_rpm_use_autosuspend() during device attach and that does:

	pm_runtime_set_autosuspend_delay(smmu->dev, 20);
	pm_runtime_use_autosuspend(smmu->dev);

whereas I would've expected these autosuspend parameters to be configured once during SMMU probe and then for attach to do something like:

	pm_runtime_mark_last_busy();
	__pm_runtime_put_autosuspend();

So I think we should probably rework the code we have slightly, which will hopefully make this giant refactoring series a little more straightforward.

Will

#35 lore raw

Re: [PATCH 22/51] iommu/arm-smmu: Switch to __pm_runtime_put_autosuspend()

Quoted 47 lines · Will Deacon
Quoted 39 lines · Pranjal Shrivastava
Quoted 15 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/iommu/arm/arm-smmu/arm-smmu.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/arm/arm-smmu/arm-smmu.c +0 -0
index 8321962b3714..cad02d5dc6d2 100644

drivers/iommu/arm/arm-smmu/arm-smmu.c static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu) · line 83

Quoted 6 lines
drivers/iommu/arm/arm-smmu/arm-smmu.c +1 -1
@@ -79,7 +79,7 @@ static inline int arm_smmu_rpm_get(struct arm_smmu_device *smmu)
 static inline void arm_smmu_rpm_put(struct arm_smmu_device *smmu)
 {
 	if (pm_runtime_enabled(smmu->dev))
-		pm_runtime_put_autosuspend(smmu->dev);
+		__pm_runtime_put_autosuspend(smmu->dev);
 }

Seems like a straightforward change as a result of [1]. Although, I had a few things to discuss:

1. The rpm_resume in drivers/base/power/runtime.c seems to call pm_runtime_mark_last_busy in case the ->runtime_resume callback returned successfully. In such a case, why would we want to move pm_runtime_mark_last_busy within pm_runtime_put_autosuspend ?

2. In the arm-smmu driver, we seem to rely on the rpm_resume to call pm_runtime_mark_last_busy as a part of the ->runtime_resume callback. The only other case, where we might wanna *mark_last_busy is if we want the autosuspend timer to be re-started in case of a failed suspend. However, the arm_smmu_runtime_suspend doesn't return errno in any case hence, I don't see any other case where we'd benefit from using mark_last_busy in the arm-smmu driver.

Quoted 2 lines

On the other hand, I don't see a problem with using it either :) Any thoughts Will/Rob/Robin?

To be honest, I think the current driver code is pretty weird. We're calling arm_smmu_rpm_use_autosuspend() during device attach and that does:

Quoted 9 lines
	pm_runtime_set_autosuspend_delay(smmu->dev, 20);
	pm_runtime_use_autosuspend(smmu->dev);

whereas I would've expected these autosuspend parameters to be configured once during SMMU probe and then for attach to do something like:

	pm_runtime_mark_last_busy();
	__pm_runtime_put_autosuspend();

Ack. I had missed the *set_autosuspend call during attach, there's no need for that to happen with each attach. I agree that we should setup autosuspend delay once during the smmu probe and mark_last_busy on attach to retain the current behaviour.

Quoted 3 lines

So I think we should probably rework the code we have slightly, which will hopefully make this giant refactoring series a little more straightforward.

+1.

Quoted 2 lines

Will

Thanks,
Pranjal

author maintainer
#36 lore raw

PATCH 23/51 irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/irqchip/irq-imx-irqsteer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-imx-irqsteer.c +1 -1
index 75a0e980ff35..f8b9462ae968 100644
@@ -84,7 +84,7 @@ static void imx_irqsteer_irq_bus_sync_unlock(struct irq_data *d)
 {
 	struct irqsteer_data *data = d->chip_data;
 
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 }
 
 static const struct irq_chip imx_irqsteer_irq_chip = {
Signature · 1 line
2.39.5
#37 lore raw

Re: [PATCH 23/51] irqchip/imx-irqsteer: Switch to __pm_runtime_put_autosuspend()

Quoted 2 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to

git grep 'This patch' Documentation/process

Quoted 2 lines

__pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

Thanks,

tglx

author maintainer
#38 lore raw

PATCH 24/51 mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/mailbox/mtk-cmdq-mailbox.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/mailbox/mtk-cmdq-mailbox.c +5 -5
index 4bff73532085..180906761eda 100644
@@ -397,7 +397,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
 
 	task = kzalloc(sizeof(*task), GFP_ATOMIC);
 	if (!task) {
-		pm_runtime_put_autosuspend(cmdq->mbox.dev);
+		__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 		return -ENOMEM;
 	}
 
@@ -447,7 +447,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
 	list_move_tail(&task->list_entry, &thread->task_busy_list);
 
 	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 
 	return 0;
 }
@@ -495,7 +495,7 @@ static void cmdq_mbox_shutdown(struct mbox_chan *chan)
 	spin_unlock_irqrestore(&thread->chan->lock, flags);
 
 	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 }
 
 static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
@@ -535,7 +535,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
 out:
 	spin_unlock_irqrestore(&thread->chan->lock, flags);
 	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 
 	return 0;
 
@@ -550,7 +550,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
 		return -EFAULT;
 	}
 	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 	return 0;
 }
 
Signature · 1 line
2.39.5
maintainer Reviewed-by on v1 24/51
#39 lore raw

Re: [PATCH 24/51] mailbox: mtk-cmdq-mailbox: Switch to __pm_runtime_put_autosuspend()

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

Quoted 53 lines
---
  drivers/mailbox/mtk-cmdq-mailbox.c | 10 +++++-----
  1 file changed, 5 insertions(+), 5 deletions(-)
drivers/mailbox/mtk-cmdq-mailbox.c +5 -5
index 4bff73532085..180906761eda 100644
@@ -397,7 +397,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
 
  	task = kzalloc(sizeof(*task), GFP_ATOMIC);
  	if (!task) {
-		pm_runtime_put_autosuspend(cmdq->mbox.dev);
+		__pm_runtime_put_autosuspend(cmdq->mbox.dev);
  		return -ENOMEM;
  	}
 
@@ -447,7 +447,7 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
  	list_move_tail(&task->list_entry, &thread->task_busy_list);
 
  	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 
  	return 0;
  }
@@ -495,7 +495,7 @@ static void cmdq_mbox_shutdown(struct mbox_chan *chan)
  	spin_unlock_irqrestore(&thread->chan->lock, flags);
 
  	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
  }
 
  static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
@@ -535,7 +535,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
  out:
  	spin_unlock_irqrestore(&thread->chan->lock, flags);
  	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
 
  	return 0;
 
@@ -550,7 +550,7 @@ static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
  		return -EFAULT;
  	}
  	pm_runtime_mark_last_busy(cmdq->mbox.dev);
-	pm_runtime_put_autosuspend(cmdq->mbox.dev);
+	__pm_runtime_put_autosuspend(cmdq->mbox.dev);
  	return 0;
  }
 
author maintainer
#40 lore raw

PATCH 25/51 media: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/media/i2c/alvium-csi2.c                      |  2 +-
 drivers/media/i2c/ccs/ccs-core.c                     | 10 +++++-----
 drivers/media/i2c/dw9719.c                           |  2 +-
 drivers/media/i2c/gc0308.c                           |  6 +++---
 drivers/media/i2c/gc2145.c                           |  8 ++++----
 drivers/media/i2c/imx283.c                           |  6 +++---
 drivers/media/i2c/imx290.c                           |  6 +++---
 drivers/media/i2c/imx296.c                           |  4 ++--
 drivers/media/i2c/imx415.c                           |  4 ++--
 drivers/media/i2c/mt9m114.c                          | 12 ++++++------
 drivers/media/i2c/ov2680.c                           |  2 +-
 drivers/media/i2c/ov4689.c                           |  6 +++---
 drivers/media/i2c/ov5640.c                           |  8 ++++----
 drivers/media/i2c/ov5645.c                           |  6 +++---
 drivers/media/i2c/ov5693.c                           |  2 +-
 drivers/media/i2c/ov64a40.c                          |  8 ++++----
 drivers/media/i2c/ov7251.c                           |  2 +-
 drivers/media/i2c/ov8858.c                           |  4 ++--
 drivers/media/i2c/thp7312.c                          |  8 ++++----
 drivers/media/i2c/video-i2c.c                        |  8 ++++----
 drivers/media/platform/nvidia/tegra-vde/h264.c       |  4 ++--
 drivers/media/platform/qcom/venus/vdec.c             |  4 ++--
 drivers/media/platform/qcom/venus/venc.c             |  4 ++--
 drivers/media/platform/raspberrypi/pisp_be/pisp_be.c |  4 ++--
 drivers/media/platform/st/sti/delta/delta-v4l2.c     |  4 ++--
 drivers/media/platform/st/sti/hva/hva-hw.c           |  8 ++++----
 drivers/media/platform/verisilicon/hantro_drv.c      |  2 +-
 drivers/media/rc/gpio-ir-recv.c                      |  2 +-
 28 files changed, 73 insertions(+), 73 deletions(-)
drivers/media/i2c/alvium-csi2.c +1 -1
index 5ddfd3dcb188..bdd1e531911f 100644
@@ -1843,7 +1843,7 @@ static int alvium_s_stream(struct v4l2_subdev *sd, int enable)
 	} else {
 		alvium_set_stream_mipi(alvium, enable);
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	alvium->streaming = !!enable;
drivers/media/i2c/ccs/ccs-core.c +5 -5
index e1ae0f9fad43..f7d4fb522473 100644
@@ -789,7 +789,7 @@ static int ccs_set_ctrl(struct v4l2_ctrl *ctrl)
 
 	if (pm_status > 0) {
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	return rval;
@@ -1919,7 +1919,7 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
 		ccs_stop_streaming(sensor);
 		sensor->streaming = false;
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 
 		return 0;
 	}
@@ -1934,7 +1934,7 @@ static int ccs_set_stream(struct v4l2_subdev *subdev, int enable)
 	if (rval < 0) {
 		sensor->streaming = false;
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 	}
 
 	return rval;
@@ -2682,7 +2682,7 @@ nvm_show(struct device *dev, struct device_attribute *attr, char *buf)
 	}
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	/*
 	 * NVM is still way below a PAGE_SIZE, so we can safely
@@ -3555,7 +3555,7 @@ static int ccs_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
 
drivers/media/i2c/dw9719.c +1 -1
index c626ed845928..36116c428a93 100644
@@ -292,7 +292,7 @@ static int dw9719_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 
drivers/media/i2c/gc0308.c +3 -3
index fa754a8a39a6..5814eeb6d2e1 100644
@@ -976,7 +976,7 @@ static int gc0308_s_ctrl(struct v4l2_ctrl *ctrl)
 		dev_err(gc0308->dev, "failed to set control: %d\n", ret);
 
 	pm_runtime_mark_last_busy(gc0308->dev);
-	pm_runtime_put_autosuspend(gc0308->dev);
+	__pm_runtime_put_autosuspend(gc0308->dev);
 
 	return ret;
 }
@@ -1161,14 +1161,14 @@ static int gc0308_start_stream(struct gc0308 *gc0308)
 
 disable_pm:
 	pm_runtime_mark_last_busy(gc0308->dev);
-	pm_runtime_put_autosuspend(gc0308->dev);
+	__pm_runtime_put_autosuspend(gc0308->dev);
 	return ret;
 }
 
 static int gc0308_stop_stream(struct gc0308 *gc0308)
 {
 	pm_runtime_mark_last_busy(gc0308->dev);
-	pm_runtime_put_autosuspend(gc0308->dev);
+	__pm_runtime_put_autosuspend(gc0308->dev);
 	return 0;
 }
 
drivers/media/i2c/gc2145.c +4 -4
index 667bb756d056..086436d823f7 100644
@@ -963,7 +963,7 @@ static int gc2145_start_streaming(struct gc2145 *gc2145,
 
 err_rpm_put:
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 	return ret;
 }
 
@@ -982,7 +982,7 @@ static void gc2145_stop_streaming(struct gc2145 *gc2145)
 		dev_err(&client->dev, "%s failed to write regs\n", __func__);
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 }
 
 static int gc2145_set_stream(struct v4l2_subdev *sd, int enable)
@@ -1210,7 +1210,7 @@ static int gc2145_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 }
@@ -1434,7 +1434,7 @@ static int gc2145_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	ret = v4l2_async_register_subdev_sensor(&gc2145->sd);
 	if (ret < 0) {
drivers/media/i2c/imx283.c +3 -3
index 94276f4f2d83..f6558251649c 100644
@@ -1145,7 +1145,7 @@ static int imx283_enable_streams(struct v4l2_subdev *sd,
 
 err_rpm_put:
 	pm_runtime_mark_last_busy(imx283->dev);
-	pm_runtime_put_autosuspend(imx283->dev);
+	__pm_runtime_put_autosuspend(imx283->dev);
 
 	return ret;
 }
@@ -1165,7 +1165,7 @@ static int imx283_disable_streams(struct v4l2_subdev *sd,
 		dev_err(imx283->dev, "Failed to stop stream\n");
 
 	pm_runtime_mark_last_busy(imx283->dev);
-	pm_runtime_put_autosuspend(imx283->dev);
+	__pm_runtime_put_autosuspend(imx283->dev);
 
 	return ret;
 }
@@ -1580,7 +1580,7 @@ static int imx283_probe(struct i2c_client *client)
 	 * autosuspend delay, turning the power off.
 	 */
 	pm_runtime_mark_last_busy(imx283->dev);
-	pm_runtime_put_autosuspend(imx283->dev);
+	__pm_runtime_put_autosuspend(imx283->dev);
 
 	return 0;
 
drivers/media/i2c/imx290.c +3 -3
index 458905dfb3e1..f1f42bec211a 100644
@@ -824,7 +824,7 @@ static int imx290_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(imx290->dev);
-	pm_runtime_put_autosuspend(imx290->dev);
+	__pm_runtime_put_autosuspend(imx290->dev);
 
 	return ret;
 }
@@ -1058,7 +1058,7 @@ static int imx290_set_stream(struct v4l2_subdev *sd, int enable)
 	} else {
 		imx290_stop_streaming(imx290);
 		pm_runtime_mark_last_busy(imx290->dev);
-		pm_runtime_put_autosuspend(imx290->dev);
+		__pm_runtime_put_autosuspend(imx290->dev);
 	}
 
 	/*
@@ -1604,7 +1604,7 @@ static int imx290_probe(struct i2c_client *client)
 	 * autosuspend delay, turning the power off.
 	 */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/media/i2c/imx296.c +2 -2
index 83149fa729c4..4003e224412b 100644
@@ -605,7 +605,7 @@ static int imx296_s_stream(struct v4l2_subdev *sd, int enable)
 		ret = imx296_stream_off(sensor);
 
 		pm_runtime_mark_last_busy(sensor->dev);
-		pm_runtime_put_autosuspend(sensor->dev);
+		__pm_runtime_put_autosuspend(sensor->dev);
 
 		goto unlock;
 	}
@@ -1102,7 +1102,7 @@ static int imx296_probe(struct i2c_client *client)
 	 */
 	pm_runtime_set_autosuspend_delay(sensor->dev, 1000);
 	pm_runtime_use_autosuspend(sensor->dev);
-	pm_runtime_put_autosuspend(sensor->dev);
+	__pm_runtime_put_autosuspend(sensor->dev);
 
 	return 0;
 
drivers/media/i2c/imx415.c +2 -2
index a20b0db330d3..1681b06cdaa8 100644
@@ -957,7 +957,7 @@ static int imx415_s_stream(struct v4l2_subdev *sd, int enable)
 		ret = imx415_stream_off(sensor);
 
 		pm_runtime_mark_last_busy(sensor->dev);
-		pm_runtime_put_autosuspend(sensor->dev);
+		__pm_runtime_put_autosuspend(sensor->dev);
 
 		goto unlock;
 	}
@@ -1399,7 +1399,7 @@ static int imx415_probe(struct i2c_client *client)
 	 */
 	pm_runtime_set_autosuspend_delay(sensor->dev, 1000);
 	pm_runtime_use_autosuspend(sensor->dev);
-	pm_runtime_put_autosuspend(sensor->dev);
+	__pm_runtime_put_autosuspend(sensor->dev);
 
 	return 0;
 
drivers/media/i2c/mt9m114.c +6 -6
index 5f0b0ad8f885..a78800f96fdb 100644
@@ -955,7 +955,7 @@ static int mt9m114_start_streaming(struct mt9m114 *sensor,
 
 error:
 	pm_runtime_mark_last_busy(&sensor->client->dev);
-	pm_runtime_put_autosuspend(&sensor->client->dev);
+	__pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
 }
@@ -969,7 +969,7 @@ static int mt9m114_stop_streaming(struct mt9m114 *sensor)
 	ret = mt9m114_set_state(sensor, MT9M114_SYS_STATE_ENTER_SUSPEND);
 
 	pm_runtime_mark_last_busy(&sensor->client->dev);
-	pm_runtime_put_autosuspend(&sensor->client->dev);
+	__pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
 }
@@ -1027,7 +1027,7 @@ static int mt9m114_pa_g_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&sensor->client->dev);
-	pm_runtime_put_autosuspend(&sensor->client->dev);
+	__pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
 }
@@ -1094,7 +1094,7 @@ static int mt9m114_pa_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&sensor->client->dev);
-	pm_runtime_put_autosuspend(&sensor->client->dev);
+	__pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
 }
@@ -1546,7 +1546,7 @@ static int mt9m114_ifp_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&sensor->client->dev);
-	pm_runtime_put_autosuspend(&sensor->client->dev);
+	__pm_runtime_put_autosuspend(&sensor->client->dev);
 
 	return ret;
 }
@@ -2438,7 +2438,7 @@ static int mt9m114_probe(struct i2c_client *client)
 	 * autosuspend delay, turning the power off.
 	 */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/media/i2c/ov2680.c +1 -1
index 7237fb27ecd0..c4766c0d09f4 100644
@@ -1245,7 +1245,7 @@ static int ov2680_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
 
drivers/media/i2c/ov4689.c +3 -3
index 1c3a449f9354..25139204fb76 100644
@@ -498,7 +498,7 @@ static int ov4689_s_stream(struct v4l2_subdev *sd, int on)
 		cci_write(ov4689->regmap, OV4689_REG_CTRL_MODE,
 			  OV4689_MODE_SW_STANDBY, NULL);
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 unlock_and_return:
@@ -703,7 +703,7 @@ static int ov4689_set_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1000,7 +1000,7 @@ static int ov4689_probe(struct i2c_client *client)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/media/i2c/ov5640.c +4 -4
index c1d3fce4a7d3..66c272f0eb06 100644
@@ -3341,7 +3341,7 @@ static int ov5640_g_volatile_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
-	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
+	__pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
 	return 0;
 }
@@ -3417,7 +3417,7 @@ static int ov5640_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
-	pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
+	__pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 
 	return ret;
 }
@@ -3754,7 +3754,7 @@ static int ov5640_s_stream(struct v4l2_subdev *sd, int enable)
 
 	if (!enable || ret) {
 		pm_runtime_mark_last_busy(&sensor->i2c_client->dev);
-		pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
+		__pm_runtime_put_autosuspend(&sensor->i2c_client->dev);
 	}
 
 	return ret;
@@ -3965,7 +3965,7 @@ static int ov5640_probe(struct i2c_client *client)
 	pm_runtime_set_autosuspend_delay(dev, 1000);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/media/i2c/ov5645.c +3 -3
index 0c32bd2940ec..15846490f88a 100644
@@ -815,7 +815,7 @@ static int ov5645_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(ov5645->dev);
-	pm_runtime_put_autosuspend(ov5645->dev);
+	__pm_runtime_put_autosuspend(ov5645->dev);
 	mutex_unlock(&ov5645->power_lock);
 
 	return ret;
@@ -1026,7 +1026,7 @@ static int ov5645_s_stream(struct v4l2_subdev *subdev, int enable)
 
 stream_off_rpm_put:
 	pm_runtime_mark_last_busy(ov5645->dev);
-	pm_runtime_put_autosuspend(ov5645->dev);
+	__pm_runtime_put_autosuspend(ov5645->dev);
 	return ret;
 }
 
@@ -1247,7 +1247,7 @@ static int ov5645_probe(struct i2c_client *client)
 	pm_runtime_set_autosuspend_delay(dev, 1000);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/media/i2c/ov5693.c +1 -1
index 46b9ce111676..7a19d654b1a1 100644
@@ -1360,7 +1360,7 @@ static int ov5693_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return ret;
 
drivers/media/i2c/ov64a40.c +4 -4
index 541bf74581d2..cfa01880bda2 100644
@@ -2992,7 +2992,7 @@ static int ov64a40_start_streaming(struct ov64a40 *ov64a40,
 
 error_power_off:
 	pm_runtime_mark_last_busy(ov64a40->dev);
-	pm_runtime_put_autosuspend(ov64a40->dev);
+	__pm_runtime_put_autosuspend(ov64a40->dev);
 
 	return ret;
 }
@@ -3002,7 +3002,7 @@ static int ov64a40_stop_streaming(struct ov64a40 *ov64a40,
 {
 	cci_update_bits(ov64a40->cci, OV64A40_REG_SMIA, BIT(0), 0, NULL);
 	pm_runtime_mark_last_busy(ov64a40->dev);
-	pm_runtime_put_autosuspend(ov64a40->dev);
+	__pm_runtime_put_autosuspend(ov64a40->dev);
 
 	__v4l2_ctrl_grab(ov64a40->link_freq, false);
 	__v4l2_ctrl_grab(ov64a40->vflip, false);
@@ -3338,7 +3338,7 @@ static int ov64a40_set_ctrl(struct v4l2_ctrl *ctrl)
 
 	if (pm_status > 0) {
 		pm_runtime_mark_last_busy(ov64a40->dev);
-		pm_runtime_put_autosuspend(ov64a40->dev);
+		__pm_runtime_put_autosuspend(ov64a40->dev);
 	}
 
 	return ret;
@@ -3631,7 +3631,7 @@ static int ov64a40_probe(struct i2c_client *client)
 	}
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
 
drivers/media/i2c/ov7251.c +1 -1
index 30f61e04ecaf..09baaf19a0f7 100644
@@ -1762,7 +1762,7 @@ static int ov7251_probe(struct i2c_client *client)
 
 	pm_runtime_set_autosuspend_delay(&client->dev, 1000);
 	pm_runtime_use_autosuspend(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	ret = v4l2_async_register_subdev(&ov7251->sd);
 	if (ret < 0) {
drivers/media/i2c/ov8858.c +2 -2
index 326f50a5ab51..ead116e7c0d8 100644
@@ -1393,7 +1393,7 @@ static int ov8858_s_stream(struct v4l2_subdev *sd, int on)
 	} else {
 		ov8858_stop_stream(ov8858);
 		pm_runtime_mark_last_busy(&client->dev);
-		pm_runtime_put_autosuspend(&client->dev);
+		__pm_runtime_put_autosuspend(&client->dev);
 	}
 
 unlock_and_return:
@@ -1953,7 +1953,7 @@ static int ov8858_probe(struct i2c_client *client)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/media/i2c/thp7312.c +4 -4
index c77440ff098c..662dfa841e8b 100644
@@ -810,7 +810,7 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
 		thp7312_stream_enable(thp7312, false);
 
 		pm_runtime_mark_last_busy(thp7312->dev);
-		pm_runtime_put_autosuspend(thp7312->dev);
+		__pm_runtime_put_autosuspend(thp7312->dev);
 
 		v4l2_subdev_unlock_state(sd_state);
 
@@ -841,7 +841,7 @@ static int thp7312_s_stream(struct v4l2_subdev *sd, int enable)
 
 finish_pm:
 	pm_runtime_mark_last_busy(thp7312->dev);
-	pm_runtime_put_autosuspend(thp7312->dev);
+	__pm_runtime_put_autosuspend(thp7312->dev);
 finish_unlock:
 	v4l2_subdev_unlock_state(sd_state);
 
@@ -1151,7 +1151,7 @@ static int thp7312_s_ctrl(struct v4l2_ctrl *ctrl)
 	}
 
 	pm_runtime_mark_last_busy(thp7312->dev);
-	pm_runtime_put_autosuspend(thp7312->dev);
+	__pm_runtime_put_autosuspend(thp7312->dev);
 
 	return ret;
 }
@@ -2187,7 +2187,7 @@ static int thp7312_probe(struct i2c_client *client)
 	 * autosuspend delay, turning the power off.
 	 */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	dev_info(dev, "THP7312 firmware version %02u.%02u\n",
 		 THP7312_FW_VERSION_MAJOR(thp7312->fw_version),
drivers/media/i2c/video-i2c.c +4 -4
index 56dbe07a1c99..0edbc48c5f28 100644
@@ -299,7 +299,7 @@ static int amg88xx_read(struct device *dev, enum hwmon_sensor_types type,
 
 	tmp = regmap_bulk_read(data->regmap, AMG88XX_REG_TTHL, &buf, 2);
 	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
-	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
+	__pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 	if (tmp)
 		return tmp;
 
@@ -538,7 +538,7 @@ static int start_streaming(struct vb2_queue *vq, unsigned int count)
 
 error_rpm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 error_del_list:
 	video_i2c_del_list(vq, VB2_BUF_STATE_QUEUED);
 
@@ -555,7 +555,7 @@ static void stop_streaming(struct vb2_queue *vq)
 	kthread_stop(data->kthread_vid_cap);
 	data->kthread_vid_cap = NULL;
 	pm_runtime_mark_last_busy(regmap_get_device(data->regmap));
-	pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
+	__pm_runtime_put_autosuspend(regmap_get_device(data->regmap));
 
 	video_i2c_del_list(vq, VB2_BUF_STATE_ERROR);
 }
@@ -866,7 +866,7 @@ static int video_i2c_probe(struct i2c_client *client)
 		goto error_pm_disable;
 
 	pm_runtime_mark_last_busy(&client->dev);
-	pm_runtime_put_autosuspend(&client->dev);
+	__pm_runtime_put_autosuspend(&client->dev);
 
 	return 0;
 
drivers/media/platform/nvidia/tegra-vde/h264.c +2 -2
index 0e56a4331b0d..2cab9def0cf8 100644
@@ -586,7 +586,7 @@ static int tegra_vde_decode_begin(struct tegra_vde *vde,
 
 put_runtime_pm:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 unlock:
 	mutex_unlock(&vde->lock);
@@ -613,7 +613,7 @@ static void tegra_vde_decode_abort(struct tegra_vde *vde)
 		dev_err(dev, "DEC end: Failed to assert HW reset: %d\n", err);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	mutex_unlock(&vde->lock);
 }
drivers/media/platform/qcom/venus/vdec.c +2 -2
index d12089370d91..3cd9ec3cac70 100644
@@ -644,7 +644,7 @@ static int vdec_pm_put(struct venus_inst *inst, bool autosuspend)
 	mutex_lock(&core->pm_lock);
 
 	if (autosuspend)
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	else
 		ret = pm_runtime_put_sync(dev);
 
@@ -666,7 +666,7 @@ static int vdec_pm_get_put(struct venus_inst *inst)
 		if (ret < 0)
 			goto error;
 
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 error:
drivers/media/platform/qcom/venus/venc.c +2 -2
index 3ec2fb8d9fab..b429ad401f34 100644
@@ -623,7 +623,7 @@ static int venc_pm_put(struct venus_inst *inst, bool autosuspend)
 	mutex_lock(&core->pm_lock);
 
 	if (autosuspend)
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	else
 		ret = pm_runtime_put_sync(dev);
 
@@ -645,7 +645,7 @@ static int venc_pm_get_put(struct venus_inst *inst)
 		if (ret < 0)
 			goto error;
 
-		ret = pm_runtime_put_autosuspend(dev);
+		ret = __pm_runtime_put_autosuspend(dev);
 	}
 
 error:
drivers/media/platform/raspberrypi/pisp_be/pisp_be.c +2 -2
index 65ff2382cffe..f5b16ee27620 100644
@@ -952,7 +952,7 @@ static void pispbe_node_stop_streaming(struct vb2_queue *q)
 	spin_unlock_irqrestore(&pispbe->hw_lock, flags);
 
 	pm_runtime_mark_last_busy(pispbe->dev);
-	pm_runtime_put_autosuspend(pispbe->dev);
+	__pm_runtime_put_autosuspend(pispbe->dev);
 
 	dev_dbg(pispbe->dev, "Nodes streaming now 0x%x\n",
 		pispbe->streaming_map);
@@ -1741,7 +1741,7 @@ static int pispbe_probe(struct platform_device *pdev)
 		goto disable_devs_err;
 
 	pm_runtime_mark_last_busy(pispbe->dev);
-	pm_runtime_put_autosuspend(pispbe->dev);
+	__pm_runtime_put_autosuspend(pispbe->dev);
 
 	return 0;
 
drivers/media/platform/st/sti/delta/delta-v4l2.c +2 -2
index da402d1e9171..667acbd674a6 100644
@@ -1288,7 +1288,7 @@ void delta_put_autosuspend(struct delta_ctx *ctx)
 {
 	struct delta_dev *delta = ctx->dev;
 
-	pm_runtime_put_autosuspend(delta->dev);
+	__pm_runtime_put_autosuspend(delta->dev);
 }
 
 static void delta_vb2_au_queue(struct vb2_buffer *vb)
@@ -1910,7 +1910,7 @@ static void delta_remove(struct platform_device *pdev)
 
 	destroy_workqueue(delta->work_queue);
 
-	pm_runtime_put_autosuspend(delta->dev);
+	__pm_runtime_put_autosuspend(delta->dev);
 	pm_runtime_disable(delta->dev);
 
 	v4l2_device_unregister(&delta->v4l2_dev);
drivers/media/platform/st/sti/hva/hva-hw.c +4 -4
index fcb18fb52fdd..00ab1fafb78a 100644
@@ -278,7 +278,7 @@ static unsigned long int hva_hw_get_ip_version(struct hva_dev *hva)
 	version = readl_relaxed(hva->regs + HVA_HIF_REG_VERSION) &
 				VERSION_ID_MASK;
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	switch (version) {
 	case HVA_VERSION_V400:
@@ -418,7 +418,7 @@ void hva_hw_remove(struct hva_dev *hva)
 	disable_irq(hva->irq_its);
 	disable_irq(hva->irq_err);
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	pm_runtime_disable(dev);
 }
 
@@ -537,7 +537,7 @@ int hva_hw_execute_task(struct hva_ctx *ctx, enum hva_hw_cmd_type cmd,
 	}
 
 	if (got_pm)
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	mutex_unlock(&hva->protect_mutex);
 
 	return ret;
@@ -578,7 +578,7 @@ void hva_hw_dump_regs(struct hva_dev *hva, struct seq_file *s)
 	DUMP(HVA_HIF_REG_CLK_GATING);
 	DUMP(HVA_HIF_REG_VERSION);
 
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	mutex_unlock(&hva->protect_mutex);
 }
 #endif
drivers/media/platform/verisilicon/hantro_drv.c +1 -1
index 05bbac853c4f..238c31cef990 100644
@@ -90,7 +90,7 @@ static void hantro_job_finish(struct hantro_dev *vpu,
 			      enum vb2_buffer_state result)
 {
 	pm_runtime_mark_last_busy(vpu->dev);
-	pm_runtime_put_autosuspend(vpu->dev);
+	__pm_runtime_put_autosuspend(vpu->dev);
 
 	clk_bulk_disable(vpu->variant->num_clocks, vpu->clocks);
 
drivers/media/rc/gpio-ir-recv.c +1 -1
index b29a1a9f381d..2316759a768a 100644
@@ -50,7 +50,7 @@ static irqreturn_t gpio_ir_recv_irq(int irq, void *dev_id)
 
 	if (pmdev) {
 		pm_runtime_mark_last_busy(pmdev);
-		pm_runtime_put_autosuspend(pmdev);
+		__pm_runtime_put_autosuspend(pmdev);
 	}
 
 	return IRQ_HANDLED;
Signature · 1 line
2.39.5
author maintainer
#41 lore raw

PATCH 26/51 mfd: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/mfd/arizona-irq.c  | 2 +-
 drivers/mfd/cs40l50-core.c | 2 +-
 drivers/mfd/cs42l43.c      | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/mfd/arizona-irq.c +1 -1
index d919ae9691e2..dd15608c65be 100644
@@ -153,7 +153,7 @@ static irqreturn_t arizona_irq_thread(int irq, void *data)
 	} while (poll);
 
 	pm_runtime_mark_last_busy(arizona->dev);
-	pm_runtime_put_autosuspend(arizona->dev);
+	__pm_runtime_put_autosuspend(arizona->dev);
 
 	return IRQ_HANDLED;
 }
drivers/mfd/cs40l50-core.c +1 -1
index 26e7a769eb14..1b467d2a486b 100644
@@ -532,7 +532,7 @@ int cs40l50_probe(struct cs40l50 *cs40l50)
 		return dev_err_probe(dev, ret, "Failed to request %s\n", CS40L50_FW);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
drivers/mfd/cs42l43.c +1 -1
index ae8fd37afb75..ac58ff2406b4 100644
@@ -961,7 +961,7 @@ static void cs42l43_boot_work(struct work_struct *work)
 	}
 
 	pm_runtime_mark_last_busy(cs42l43->dev);
-	pm_runtime_put_autosuspend(cs42l43->dev);
+	__pm_runtime_put_autosuspend(cs42l43->dev);
 
 	return;
 
Signature · 1 line
2.39.5
author maintainer
#42 lore raw

PATCH 27/51 mei: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/misc/mei/client.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
drivers/misc/mei/client.c +7 -7
index 9d090fa07516..fcdf62400a50 100644
@@ -1014,7 +1014,7 @@ int mei_cl_disconnect(struct mei_cl *cl)
 
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	return rets;
 }
@@ -1190,7 +1190,7 @@ int mei_cl_connect(struct mei_cl *cl, struct mei_me_client *me_cl,
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
 
@@ -1577,7 +1577,7 @@ int mei_cl_notify_request(struct mei_cl *cl,
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
 	return rets;
@@ -1725,7 +1725,7 @@ int mei_cl_read_start(struct mei_cl *cl, size_t length, const struct file *fp)
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 nortpm:
 	if (rets)
 		mei_io_cb_free(cb);
@@ -2115,7 +2115,7 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, unsigned long time
 err:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 free:
 	mei_io_cb_free(cb);
 
@@ -2389,7 +2389,7 @@ int mei_cl_dma_alloc_and_map(struct mei_cl *cl, const struct file *fp,
 
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
 	return rets;
@@ -2467,7 +2467,7 @@ int mei_cl_dma_unmap(struct mei_cl *cl, const struct file *fp)
 out:
 	cl_dbg(dev, cl, "rpm: autosuspend\n");
 	pm_runtime_mark_last_busy(dev->dev);
-	pm_runtime_put_autosuspend(dev->dev);
+	__pm_runtime_put_autosuspend(dev->dev);
 
 	mei_io_cb_free(cb);
 	return rets;
Signature · 1 line
2.39.5
author maintainer
#43 lore raw

PATCH 28/51 mmc: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/mmc/core/core.c            | 4 ++--
 drivers/mmc/host/atmel-mci.c       | 4 ++--
 drivers/mmc/host/dw_mmc-rockchip.c | 2 +-
 drivers/mmc/host/dw_mmc.c          | 2 +-
 drivers/mmc/host/mmci.c            | 2 +-
 drivers/mmc/host/omap_hsmmc.c      | 6 +++---
 drivers/mmc/host/sdhci-msm.c       | 2 +-
 drivers/mmc/host/sdhci-of-at91.c   | 2 +-
 drivers/mmc/host/sdhci-omap.c      | 4 ++--
 drivers/mmc/host/sdhci-pci-core.c  | 2 +-
 drivers/mmc/host/sdhci-pxav3.c     | 6 +++---
 drivers/mmc/host/sdhci-sprd.c      | 2 +-
 drivers/mmc/host/sdhci-xenon.c     | 2 +-
 drivers/mmc/host/sdhci_am654.c     | 2 +-
 drivers/mmc/host/tmio_mmc_core.c   | 2 +-
 15 files changed, 22 insertions(+), 22 deletions(-)
drivers/mmc/core/core.c +2 -2
index d6c819dd68ed..edfa700ef06c 100644
@@ -849,7 +849,7 @@ void mmc_release_host(struct mmc_host *host)
 		if (host->caps & MMC_CAP_SYNC_RUNTIME_PM)
 			pm_runtime_put_sync_suspend(mmc_dev(host));
 		else
-			pm_runtime_put_autosuspend(mmc_dev(host));
+			__pm_runtime_put_autosuspend(mmc_dev(host));
 	}
 }
 EXPORT_SYMBOL(mmc_release_host);
@@ -877,7 +877,7 @@ void mmc_put_card(struct mmc_card *card, struct mmc_ctx *ctx)
 
 	mmc_release_host(host);
 	pm_runtime_mark_last_busy(&card->dev);
-	pm_runtime_put_autosuspend(&card->dev);
+	__pm_runtime_put_autosuspend(&card->dev);
 }
 EXPORT_SYMBOL(mmc_put_card);
 
drivers/mmc/host/atmel-mci.c +2 -2
index 204055b3c042..0ce3e1d62fbd 100644
@@ -542,7 +542,7 @@ static int atmci_regs_show(struct seq_file *s, void *v)
 	spin_unlock_bh(&host->lock);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	seq_printf(s, "MR:\t0x%08x%s%s ",
 			buf[ATMCI_MR / 4],
@@ -2568,7 +2568,7 @@ static int atmci_probe(struct platform_device *pdev)
 		 host->mapbase, irq, nr_slots);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/mmc/host/dw_mmc-rockchip.c +1 -1
index baa23b517731..888f1f36808d 100644
@@ -553,7 +553,7 @@ static int dw_mci_rockchip_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 }
drivers/mmc/host/dw_mmc.c +1 -1
index 41e451235f63..3832eb66f60f 100644
@@ -159,7 +159,7 @@ static int dw_mci_regs_show(struct seq_file *s, void *v)
 	seq_printf(s, "INTMASK:\t0x%08x\n", mci_readl(host, INTMASK));
 	seq_printf(s, "CLKENA:\t0x%08x\n", mci_readl(host, CLKENA));
 
-	pm_runtime_put_autosuspend(host->dev);
+	__pm_runtime_put_autosuspend(host->dev);
 
 	return 0;
 }
drivers/mmc/host/mmci.c +1 -1
index b790c3c3c8f9..f842ee951965 100644
@@ -2083,7 +2083,7 @@ static void mmci_enable_sdio_irq(struct mmc_host *mmc, int enable)
 
 	if (!enable) {
 		pm_runtime_mark_last_busy(mmc_dev(mmc));
-		pm_runtime_put_autosuspend(mmc_dev(mmc));
+		__pm_runtime_put_autosuspend(mmc_dev(mmc));
 	}
 }
 
drivers/mmc/host/omap_hsmmc.c +3 -3
index 59e36e0ebbbf..ca4400aa61ea 100644
@@ -1664,7 +1664,7 @@ static int mmc_regs_show(struct seq_file *s, void *data)
 			OMAP_HSMMC_READ(host->base, CAPA));
 
 	pm_runtime_mark_last_busy(host->dev);
-	pm_runtime_put_autosuspend(host->dev);
+	__pm_runtime_put_autosuspend(host->dev);
 
 	return 0;
 }
@@ -1957,7 +1957,7 @@ static int omap_hsmmc_probe(struct platform_device *pdev)
 
 	omap_hsmmc_debugfs(mmc);
 	pm_runtime_mark_last_busy(host->dev);
-	pm_runtime_put_autosuspend(host->dev);
+	__pm_runtime_put_autosuspend(host->dev);
 
 	return 0;
 
@@ -2039,7 +2039,7 @@ static int omap_hsmmc_resume(struct device *dev)
 		omap_hsmmc_conf_bus_power(host);
 
 	pm_runtime_mark_last_busy(host->dev);
-	pm_runtime_put_autosuspend(host->dev);
+	__pm_runtime_put_autosuspend(host->dev);
 	return 0;
 }
 #endif
drivers/mmc/host/sdhci-msm.c +1 -1
index 8dd180a42f72..28b25689a44f 100644
@@ -2649,7 +2649,7 @@ static int sdhci_msm_probe(struct platform_device *pdev)
 		goto pm_runtime_disable;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
drivers/mmc/host/sdhci-of-at91.c +1 -1
index 97988ed37467..b8079d3f9316 100644
@@ -426,7 +426,7 @@ static int sdhci_at91_probe(struct platform_device *pdev)
 	    || mmc_gpio_get_cd(host->mmc) >= 0)
 		sdhci_at91_set_force_card_detect(host);
 
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
drivers/mmc/host/sdhci-omap.c +2 -2
index 54d795205fb4..f97165e66e20 100644
@@ -1374,7 +1374,7 @@ static int sdhci_omap_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
@@ -1383,7 +1383,7 @@ static int sdhci_omap_probe(struct platform_device *pdev)
 
 err_rpm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 err_rpm_disable:
 	pm_runtime_dont_use_autosuspend(dev);
 	pm_runtime_disable(dev);
drivers/mmc/host/sdhci-pci-core.c +1 -1
index ed45ed0bdafd..3f8cd788fcb7 100644
@@ -794,7 +794,7 @@ static void intel_ltr_set(struct device *dev, s32 val)
 	/* Cache the values into lpss structure */
 	intel_cache_ltr(slot);
 out:
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static bool intel_use_ltr(struct sdhci_pci_chip *chip)
drivers/mmc/host/sdhci-pxav3.c +3 -3
index 990723a008ae..e8e30c10f244 100644
@@ -454,7 +454,7 @@ static int sdhci_pxav3_probe(struct platform_device *pdev)
 	if (host->mmc->pm_caps & MMC_PM_WAKE_SDIO_IRQ)
 		device_init_wakeup(&pdev->dev, 1);
 
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
@@ -499,7 +499,7 @@ static int sdhci_pxav3_suspend(struct device *dev)
 		mmc_retune_needed(host->mmc);
 	ret = sdhci_suspend_host(host);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -512,7 +512,7 @@ static int sdhci_pxav3_resume(struct device *dev)
 	pm_runtime_get_sync(dev);
 	ret = sdhci_resume_host(host);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
drivers/mmc/host/sdhci-sprd.c +1 -1
index db5e253b0f79..0e6f7acbaf96 100644
@@ -872,7 +872,7 @@ static int sdhci_sprd_probe(struct platform_device *pdev)
 		goto err_cleanup_host;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
drivers/mmc/host/sdhci-xenon.c +1 -1
index 098f0ea45cbe..a647fac22bdd 100644
@@ -581,7 +581,7 @@ static int xenon_probe(struct platform_device *pdev)
 	if (err)
 		goto remove_sdhc;
 
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 	/*
 	 * If we previously detected AC5 with over 2GB of memory,
 	 * then we disable ADMA and 64-bit DMA.
drivers/mmc/host/sdhci_am654.c +1 -1
index b73f673db92b..4f6fbb632d90 100644
@@ -989,7 +989,7 @@ static int sdhci_am654_probe(struct platform_device *pdev)
 	pm_runtime_set_autosuspend_delay(dev, SDHCI_AM654_AUTOSUSPEND_DELAY);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return 0;
 
 clk_disable:
drivers/mmc/host/tmio_mmc_core.c +1 -1
index 45a474ccab1c..06f1a7fba104 100644
@@ -161,7 +161,7 @@ static void tmio_mmc_enable_sdio_irq(struct mmc_host *mmc, int enable)
 
 		host->sdio_irq_enabled = false;
 		pm_runtime_mark_last_busy(mmc_dev(mmc));
-		pm_runtime_put_autosuspend(mmc_dev(mmc));
+		__pm_runtime_put_autosuspend(mmc_dev(mmc));
 	}
 }
 
Signature · 1 line
2.39.5
author maintainer
#44 lore raw

PATCH 29/51 mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c +5 -5
index e1b515304e3c..1a8fe322f5d6 100644
@@ -187,7 +187,7 @@ static int gpmi_init(struct gpmi_nand_data *this)
 
 err_out:
 	pm_runtime_mark_last_busy(this->dev);
-	pm_runtime_put_autosuspend(this->dev);
+	__pm_runtime_put_autosuspend(this->dev);
 	return ret;
 }
 
@@ -739,7 +739,7 @@ static int bch_set_geometry(struct gpmi_nand_data *this)
 
 	ret = pm_runtime_get_sync(this->dev);
 	if (ret < 0) {
-		pm_runtime_put_autosuspend(this->dev);
+		__pm_runtime_put_autosuspend(this->dev);
 		return ret;
 	}
 
@@ -758,7 +758,7 @@ static int bch_set_geometry(struct gpmi_nand_data *this)
 	ret = 0;
 err_out:
 	pm_runtime_mark_last_busy(this->dev);
-	pm_runtime_put_autosuspend(this->dev);
+	__pm_runtime_put_autosuspend(this->dev);
 
 	return ret;
 }
@@ -2664,7 +2664,7 @@ static int gpmi_nfc_exec_op(struct nand_chip *chip,
 
 out_pm:
 	pm_runtime_mark_last_busy(this->dev);
-	pm_runtime_put_autosuspend(this->dev);
+	__pm_runtime_put_autosuspend(this->dev);
 
 	return ret;
 }
@@ -2780,7 +2780,7 @@ static int gpmi_nand_probe(struct platform_device *pdev)
 		goto exit_nfc_init;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_info(this->dev, "driver registered.\n");
 
Signature · 6 lines
2.39.5


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/
maintainer
#45 lore raw

Re: [PATCH 29/51] mtd: rawnand: gpmi: Switch to __pm_runtime_put_autosuspend()

Hi Sakari,

[email protected] wrote on Fri, 4 Oct 2024 12:41:33 +0300:

Quoted 6 lines

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

Are you sure using a callback prefixed with '__' is relevant in normal drivers? I'd expect something cleaner from a naming point of view.

Thanks,
Miquèl

______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

author maintainer
#46 lore raw

PATCH 30/51 net: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/net/ethernet/cadence/macb_main.c    | 10 +--
 drivers/net/ethernet/freescale/fec_main.c   | 16 ++---
 drivers/net/ethernet/renesas/ravb_main.c    |  8 +--
 drivers/net/ethernet/ti/davinci_mdio.c      | 14 ++--
 drivers/net/ipa/ipa_interrupt.c             |  2 +-
 drivers/net/ipa/ipa_main.c                  |  2 +-
 drivers/net/ipa/ipa_modem.c                 |  8 +--
 drivers/net/ipa/ipa_smp2p.c                 |  4 +-
 drivers/net/ipa/ipa_uc.c                    |  4 +-
 drivers/net/wireless/ath/wil6210/pm.c       |  2 +-
 drivers/net/wireless/ti/wl18xx/debugfs.c    |  6 +-
 drivers/net/wireless/ti/wlcore/cmd.c        |  2 +-
 drivers/net/wireless/ti/wlcore/debugfs.c    | 22 +++----
 drivers/net/wireless/ti/wlcore/main.c       | 72 ++++++++++-----------
 drivers/net/wireless/ti/wlcore/scan.c       |  2 +-
 drivers/net/wireless/ti/wlcore/sysfs.c      |  2 +-
 drivers/net/wireless/ti/wlcore/testmode.c   |  4 +-
 drivers/net/wireless/ti/wlcore/tx.c         |  2 +-
 drivers/net/wireless/ti/wlcore/vendor_cmd.c |  6 +-
 drivers/net/wwan/qcom_bam_dmux.c            |  4 +-
 drivers/net/wwan/t7xx/t7xx_hif_cldma.c      |  6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c  |  6 +-
 drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c  |  4 +-
 23 files changed, 104 insertions(+), 104 deletions(-)
drivers/net/ethernet/cadence/macb_main.c +5 -5
index f06babec04a0..929ac771d5c3 100644
@@ -364,7 +364,7 @@ static int macb_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum)
 
 mdio_read_exit:
 	pm_runtime_mark_last_busy(&bp->pdev->dev);
-	pm_runtime_put_autosuspend(&bp->pdev->dev);
+	__pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
 }
@@ -410,7 +410,7 @@ static int macb_mdio_read_c45(struct mii_bus *bus, int mii_id, int devad,
 
 mdio_read_exit:
 	pm_runtime_mark_last_busy(&bp->pdev->dev);
-	pm_runtime_put_autosuspend(&bp->pdev->dev);
+	__pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
 }
@@ -442,7 +442,7 @@ static int macb_mdio_write_c22(struct mii_bus *bus, int mii_id, int regnum,
 
 mdio_write_exit:
 	pm_runtime_mark_last_busy(&bp->pdev->dev);
-	pm_runtime_put_autosuspend(&bp->pdev->dev);
+	__pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
 }
@@ -488,7 +488,7 @@ static int macb_mdio_write_c45(struct mii_bus *bus, int mii_id,
 
 mdio_write_exit:
 	pm_runtime_mark_last_busy(&bp->pdev->dev);
-	pm_runtime_put_autosuspend(&bp->pdev->dev);
+	__pm_runtime_put_autosuspend(&bp->pdev->dev);
 mdio_pm_exit:
 	return status;
 }
@@ -5180,7 +5180,7 @@ static int macb_probe(struct platform_device *pdev)
 		    dev->base_addr, dev->irq, dev->dev_addr);
 
 	pm_runtime_mark_last_busy(&bp->pdev->dev);
-	pm_runtime_put_autosuspend(&bp->pdev->dev);
+	__pm_runtime_put_autosuspend(&bp->pdev->dev);
 
 	return 0;
 
drivers/net/ethernet/freescale/fec_main.c +8 -8
index 31ebf6a4f973..493bfc7e44ee 100644
@@ -2166,7 +2166,7 @@ static int fec_enet_mdio_read_c22(struct mii_bus *bus, int mii_id, int regnum)
 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -2215,7 +2215,7 @@ static int fec_enet_mdio_read_c45(struct mii_bus *bus, int mii_id,
 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -2247,7 +2247,7 @@ static int fec_enet_mdio_write_c22(struct mii_bus *bus, int mii_id, int regnum,
 		netdev_err(fep->netdev, "MDIO write timeout\n");
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -2291,7 +2291,7 @@ static int fec_enet_mdio_write_c45(struct mii_bus *bus, int mii_id,
 
 out:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -2773,7 +2773,7 @@ static void fec_enet_get_regs(struct net_device *ndev,
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static int fec_enet_get_ts_info(struct net_device *ndev,
@@ -3557,7 +3557,7 @@ fec_enet_open(struct net_device *ndev)
 	fec_enet_clk_enable(ndev, false);
 clk_enable:
 	pm_runtime_mark_last_busy(&fep->pdev->dev);
-	pm_runtime_put_autosuspend(&fep->pdev->dev);
+	__pm_runtime_put_autosuspend(&fep->pdev->dev);
 	pinctrl_pm_select_sleep_state(&fep->pdev->dev);
 	return ret;
 }
@@ -3588,7 +3588,7 @@ fec_enet_close(struct net_device *ndev)
 
 	pinctrl_pm_select_sleep_state(&fep->pdev->dev);
 	pm_runtime_mark_last_busy(&fep->pdev->dev);
-	pm_runtime_put_autosuspend(&fep->pdev->dev);
+	__pm_runtime_put_autosuspend(&fep->pdev->dev);
 
 	fec_enet_free_buffers(ndev);
 
@@ -4535,7 +4535,7 @@ fec_probe(struct platform_device *pdev)
 	INIT_WORK(&fep->tx_timeout_work, fec_enet_timeout_work);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
drivers/net/ethernet/renesas/ravb_main.c +4 -4
index d2a6518532f3..14c4c2070c2c 100644
@@ -1981,7 +1981,7 @@ static int ravb_open(struct net_device *ndev)
 	ravb_set_opmode(ndev, CCC_OPC_RESET);
 out_rpm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 out_napi_off:
 	if (info->nc_queues)
 		napi_disable(&priv->napi[RAVB_NC]);
@@ -2378,7 +2378,7 @@ static int ravb_close(struct net_device *ndev)
 		return error;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -3081,7 +3081,7 @@ static int ravb_probe(struct platform_device *pdev)
 		    (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
@@ -3260,7 +3260,7 @@ static int ravb_resume(struct device *dev)
 out_rpm_put:
 	if (!priv->wol_enabled) {
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 	}
 
 	return ret;
drivers/net/ethernet/ti/davinci_mdio.c +7 -7
index 8e07d4a1b6ba..77893fc41a76 100644
@@ -235,7 +235,7 @@ static int davinci_mdiobb_read_c22(struct mii_bus *bus, int phy, int reg)
 	ret = mdiobb_read_c22(bus, phy, reg);
 
 	pm_runtime_mark_last_busy(bus->parent);
-	pm_runtime_put_autosuspend(bus->parent);
+	__pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
 }
@@ -252,7 +252,7 @@ static int davinci_mdiobb_write_c22(struct mii_bus *bus, int phy, int reg,
 	ret = mdiobb_write_c22(bus, phy, reg, val);
 
 	pm_runtime_mark_last_busy(bus->parent);
-	pm_runtime_put_autosuspend(bus->parent);
+	__pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
 }
@@ -269,7 +269,7 @@ static int davinci_mdiobb_read_c45(struct mii_bus *bus, int phy, int devad,
 	ret = mdiobb_read_c45(bus, phy, devad, reg);
 
 	pm_runtime_mark_last_busy(bus->parent);
-	pm_runtime_put_autosuspend(bus->parent);
+	__pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
 }
@@ -286,7 +286,7 @@ static int davinci_mdiobb_write_c45(struct mii_bus *bus, int phy, int devad,
 	ret = mdiobb_write_c45(bus, phy, devad, reg, val);
 
 	pm_runtime_mark_last_busy(bus->parent);
-	pm_runtime_put_autosuspend(bus->parent);
+	__pm_runtime_put_autosuspend(bus->parent);
 
 	return ret;
 }
@@ -333,7 +333,7 @@ static int davinci_mdio_common_reset(struct davinci_mdio_data *data)
 
 done:
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return 0;
 }
@@ -442,7 +442,7 @@ static int davinci_mdio_read(struct mii_bus *bus, int phy_id, int phy_reg)
 	}
 
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 	return ret;
 }
 
@@ -479,7 +479,7 @@ static int davinci_mdio_write(struct mii_bus *bus, int phy_id,
 	}
 
 	pm_runtime_mark_last_busy(data->dev);
-	pm_runtime_put_autosuspend(data->dev);
+	__pm_runtime_put_autosuspend(data->dev);
 
 	return ret;
 }
drivers/net/ipa/ipa_interrupt.c +1 -1
index 245a06997055..737ffff14770 100644
@@ -150,7 +150,7 @@ static irqreturn_t ipa_isr_thread(int irq, void *dev_id)
 	}
 out_power_put:
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	return IRQ_HANDLED;
 }
drivers/net/ipa/ipa_main.c +1 -1
index 5f3dd5a2dcf4..bdb5e7b6cf29 100644
@@ -912,7 +912,7 @@ static int ipa_probe(struct platform_device *pdev)
 		goto err_deconfig;
 done:
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/net/ipa/ipa_modem.c +4 -4
index 8fe0d0e1a00f..17187676edae 100644
@@ -72,7 +72,7 @@ static int ipa_open(struct net_device *netdev)
 	netif_start_queue(netdev);
 
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
@@ -103,7 +103,7 @@ static int ipa_stop(struct net_device *netdev)
 	ipa_endpoint_disable_one(priv->tx);
 out_power_put:
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
@@ -176,7 +176,7 @@ ipa_start_xmit(struct sk_buff *skb, struct net_device *netdev)
 	ret = ipa_endpoint_skb_tx(endpoint, skb);
 
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	if (ret) {
 		if (ret != -E2BIG)
@@ -433,7 +433,7 @@ static void ipa_modem_crashed(struct ipa *ipa)
 
 out_power_put:
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 }
 
 static int ipa_modem_notify(struct notifier_block *nb, unsigned long action,
drivers/net/ipa/ipa_smp2p.c +2 -2
index fcaadd111a8a..6339a1b580f2 100644
@@ -172,7 +172,7 @@ static irqreturn_t ipa_smp2p_modem_setup_ready_isr(int irq, void *dev_id)
 
 out_power_put:
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 
 	return IRQ_HANDLED;
 }
@@ -214,7 +214,7 @@ static void ipa_smp2p_power_release(struct ipa *ipa)
 		return;
 
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 	ipa->smp2p->power_on = false;
 }
 
drivers/net/ipa/ipa_uc.c +2 -2
index 2963db83ab6b..256e6bad66c4 100644
@@ -159,7 +159,7 @@ static void ipa_uc_response_hdlr(struct ipa *ipa)
 			ipa->uc_loaded = true;
 			ipa_power_retention(ipa, true);
 			pm_runtime_mark_last_busy(dev);
-			(void)pm_runtime_put_autosuspend(dev);
+			(void) __pm_runtime_put_autosuspend(dev);
 			ipa->uc_powered = false;
 		} else {
 			dev_warn(dev, "unexpected init_completed response\n");
@@ -204,7 +204,7 @@ void ipa_uc_deconfig(struct ipa *ipa)
 		return;
 
 	pm_runtime_mark_last_busy(dev);
-	(void)pm_runtime_put_autosuspend(dev);
+	(void) __pm_runtime_put_autosuspend(dev);
 }
 
 /* Take a proxy power reference for the microcontroller */
drivers/net/wireless/ath/wil6210/pm.c +1 -1
index f521af575e9b..eecafeb2ba90 100644
@@ -459,5 +459,5 @@ void wil_pm_runtime_put(struct wil6210_priv *wil)
 	struct device *dev = wil_to_dev(wil);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
drivers/net/wireless/ti/wl18xx/debugfs.c +3 -3
index 80fbf740fe6d..33b780cd153a 100644
@@ -273,7 +273,7 @@ static ssize_t radar_detection_write(struct file *file,
 		count = ret;
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -313,7 +313,7 @@ static ssize_t dynamic_fw_traces_write(struct file *file,
 		count = ret;
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -375,7 +375,7 @@ static ssize_t radar_debug_mode_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
drivers/net/wireless/ti/wlcore/cmd.c +1 -1
index cd8ad0fe59cc..1a1444fc0ff0 100644
@@ -214,7 +214,7 @@ int wlcore_cmd_wait_for_event_or_timeout(struct wl1271 *wl,
 
 out:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 free_vector:
 	kfree(events_vector);
 	return ret;
drivers/net/wireless/ti/wlcore/debugfs.c +11 -11
index eb3d3f0e0b4d..4e7444066dd0 100644
@@ -64,7 +64,7 @@ void wl1271_debugfs_update_stats(struct wl1271 *wl)
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -114,7 +114,7 @@ static void chip_op_handler(struct wl1271 *wl, unsigned long value,
 	chip_op(wl);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 }
 
 #define WL12XX_CONF_DEBUGFS(param, conf_sub_struct,			\
@@ -288,7 +288,7 @@ static ssize_t dynamic_ps_timeout_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -358,7 +358,7 @@ static ssize_t forced_ps_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
@@ -831,7 +831,7 @@ static ssize_t rx_streaming_interval_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -887,7 +887,7 @@ static ssize_t rx_streaming_always_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -935,7 +935,7 @@ static ssize_t beacon_filtering_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -1016,7 +1016,7 @@ static ssize_t sleep_auth_write(struct file *file,
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 	return count;
@@ -1091,7 +1091,7 @@ static ssize_t dev_mem_read(struct file *file,
 
 part_err:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 skip_read:
 	mutex_unlock(&wl->mutex);
@@ -1173,7 +1173,7 @@ static ssize_t dev_mem_write(struct file *file, const char __user *user_buf,
 
 part_err:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 skip_write:
 	mutex_unlock(&wl->mutex);
@@ -1248,7 +1248,7 @@ static ssize_t fw_logger_write(struct file *file,
 	ret = wl12xx_cmd_config_fwlog(wl);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 out:
 	mutex_unlock(&wl->mutex);
drivers/net/wireless/ti/wlcore/main.c +36 -36

288 lines not on this page · raw message

drivers/net/wireless/ti/wlcore/scan.c +1 -1
index b414305acc32..ee16dc1c7da3 100644
@@ -70,7 +70,7 @@ void wl1271_scan_complete_work(struct work_struct *work)
 	wlcore_cmd_regdomain_config_locked(wl);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
 	ieee80211_scan_completed(wl->hw, &info);
 
drivers/net/wireless/ti/wlcore/sysfs.c +1 -1
index c07acfcbbd9c..52fa40b5b8e7 100644
@@ -59,7 +59,7 @@ static ssize_t bt_coex_state_store(struct device *dev,
 
 	wl1271_acx_sg_enable(wl, wl->sg_enabled);
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 
  out:
 	mutex_unlock(&wl->mutex);
drivers/net/wireless/ti/wlcore/testmode.c +2 -2
index 3f338b8096c7..9b2c5ae7aef3 100644
@@ -128,7 +128,7 @@ static int wl1271_tm_cmd_test(struct wl1271 *wl, struct nlattr *tb[])
 
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -193,7 +193,7 @@ static int wl1271_tm_cmd_interrogate(struct wl1271 *wl, struct nlattr *tb[])
 	kfree(cmd);
 out_sleep:
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
drivers/net/wireless/ti/wlcore/tx.c +1 -1
index 464587d16ab2..8151818722d7 100644
@@ -864,7 +864,7 @@ void wl1271_tx_work(struct work_struct *work)
 	}
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 }
drivers/net/wireless/ti/wlcore/vendor_cmd.c +3 -3
index e4269e2b0098..f9bdbf2f387b 100644
@@ -61,7 +61,7 @@ wlcore_vendor_cmd_smart_config_start(struct wiphy *wiphy,
 			nla_get_u32(tb[WLCORE_VENDOR_ATTR_GROUP_ID]));
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -93,7 +93,7 @@ wlcore_vendor_cmd_smart_config_stop(struct wiphy *wiphy,
 	ret = wlcore_smart_config_stop(wl);
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
@@ -141,7 +141,7 @@ wlcore_vendor_cmd_smart_config_set_group_key(struct wiphy *wiphy,
 			nla_data(tb[WLCORE_VENDOR_ATTR_GROUP_KEY]));
 
 	pm_runtime_mark_last_busy(wl->dev);
-	pm_runtime_put_autosuspend(wl->dev);
+	__pm_runtime_put_autosuspend(wl->dev);
 out:
 	mutex_unlock(&wl->mutex);
 
drivers/net/wwan/qcom_bam_dmux.c +2 -2
index 5dcb9a84a12e..59f6cacf2280 100644
@@ -163,7 +163,7 @@ static void bam_dmux_tx_done(struct bam_dmux_skb_dma *skb_dma)
 	unsigned long flags;
 
 	pm_runtime_mark_last_busy(dmux->dev);
-	pm_runtime_put_autosuspend(dmux->dev);
+	__pm_runtime_put_autosuspend(dmux->dev);
 
 	if (skb_dma->addr)
 		bam_dmux_skb_dma_unmap(skb_dma, DMA_TO_DEVICE);
@@ -398,7 +398,7 @@ static void bam_dmux_tx_wakeup_work(struct work_struct *work)
 
 out:
 	pm_runtime_mark_last_busy(dmux->dev);
-	pm_runtime_put_autosuspend(dmux->dev);
+	__pm_runtime_put_autosuspend(dmux->dev);
 }
 
 static const struct net_device_ops bam_dmux_ops = {
drivers/net/wwan/t7xx/t7xx_hif_cldma.c +3 -3
index 97163e1e5783..16f0708c8c54 100644
@@ -251,7 +251,7 @@ static void t7xx_cldma_rx_done(struct work_struct *work)
 	t7xx_cldma_hw_irq_en_txrx(&md_ctrl->hw_info, queue->index, MTK_RX);
 	t7xx_cldma_hw_irq_en_eq(&md_ctrl->hw_info, queue->index, MTK_RX);
 	pm_runtime_mark_last_busy(md_ctrl->dev);
-	pm_runtime_put_autosuspend(md_ctrl->dev);
+	__pm_runtime_put_autosuspend(md_ctrl->dev);
 }
 
 static int t7xx_cldma_gpd_tx_collect(struct cldma_queue *queue)
@@ -363,7 +363,7 @@ static void t7xx_cldma_tx_done(struct work_struct *work)
 	spin_unlock_irqrestore(&md_ctrl->cldma_lock, flags);
 
 	pm_runtime_mark_last_busy(md_ctrl->dev);
-	pm_runtime_put_autosuspend(md_ctrl->dev);
+	__pm_runtime_put_autosuspend(md_ctrl->dev);
 }
 
 static void t7xx_cldma_ring_free(struct cldma_ctrl *md_ctrl,
@@ -988,7 +988,7 @@ int t7xx_cldma_send_skb(struct cldma_ctrl *md_ctrl, int qno, struct sk_buff *skb
 allow_sleep:
 	t7xx_pci_enable_sleep(md_ctrl->t7xx_dev);
 	pm_runtime_mark_last_busy(md_ctrl->dev);
-	pm_runtime_put_autosuspend(md_ctrl->dev);
+	__pm_runtime_put_autosuspend(md_ctrl->dev);
 	return ret;
 }
 
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_rx.c +3 -3
index 210d84c67ef9..9329d7a04814 100644
@@ -840,7 +840,7 @@ int t7xx_dpmaif_napi_rx_poll(struct napi_struct *napi, const int budget)
 
 	if (!rxq->que_started) {
 		atomic_set(&rxq->rx_processing, 0);
-		pm_runtime_put_autosuspend(rxq->dpmaif_ctrl->dev);
+		__pm_runtime_put_autosuspend(rxq->dpmaif_ctrl->dev);
 		dev_err(rxq->dpmaif_ctrl->dev, "Work RXQ: %d has not been started\n", rxq->index);
 		return work_done;
 	}
@@ -877,7 +877,7 @@ int t7xx_dpmaif_napi_rx_poll(struct napi_struct *napi, const int budget)
 		t7xx_dpmaif_dlq_unmask_rx_done(&rxq->dpmaif_ctrl->hw_info, rxq->index);
 		t7xx_pci_enable_sleep(rxq->dpmaif_ctrl->t7xx_dev);
 		pm_runtime_mark_last_busy(rxq->dpmaif_ctrl->dev);
-		pm_runtime_put_autosuspend(rxq->dpmaif_ctrl->dev);
+		__pm_runtime_put_autosuspend(rxq->dpmaif_ctrl->dev);
 		atomic_set(&rxq->rx_processing, 0);
 	} else {
 		t7xx_dpmaif_clr_ip_busy_sts(&rxq->dpmaif_ctrl->hw_info);
@@ -1078,7 +1078,7 @@ static void t7xx_dpmaif_bat_release_work(struct work_struct *work)
 
 	t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
 	pm_runtime_mark_last_busy(dpmaif_ctrl->dev);
-	pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
+	__pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
 }
 
 int t7xx_dpmaif_bat_rel_wq_alloc(struct dpmaif_ctrl *dpmaif_ctrl)
drivers/net/wwan/t7xx/t7xx_hif_dpmaif_tx.c +2 -2
index 8dab025a088a..de8f4284ee28 100644
@@ -186,7 +186,7 @@ static void t7xx_dpmaif_tx_done(struct work_struct *work)
 
 	t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
 	pm_runtime_mark_last_busy(dpmaif_ctrl->dev);
-	pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
+	__pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
 }
 
 static void t7xx_setup_msg_drb(struct dpmaif_ctrl *dpmaif_ctrl, unsigned int q_num,
@@ -469,7 +469,7 @@ static int t7xx_dpmaif_tx_hw_push_thread(void *arg)
 		t7xx_do_tx_hw_push(dpmaif_ctrl);
 		t7xx_pci_enable_sleep(dpmaif_ctrl->t7xx_dev);
 		pm_runtime_mark_last_busy(dpmaif_ctrl->dev);
-		pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
+		__pm_runtime_put_autosuspend(dpmaif_ctrl->dev);
 	}
 
 	return 0;
Signature · 1 line
2.39.5
author maintainer
#47 lore raw

PATCH 31/51 nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/nfc/trf7970a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/trf7970a.c +1 -1
index 9e1a34e23af2..4549f1960a27 100644
@@ -1093,7 +1093,7 @@ static void trf7970a_switch_rf_off(struct trf7970a *trf)
 	trf->state = TRF7970A_ST_RF_OFF;
 
 	pm_runtime_mark_last_busy(trf->dev);
-	pm_runtime_put_autosuspend(trf->dev);
+	__pm_runtime_put_autosuspend(trf->dev);
 }
 
 static int trf7970a_switch_rf_on(struct trf7970a *trf)
Signature · 1 line
2.39.5
#48 lore raw

Re: [PATCH 31/51] nfc: trf7970a: Switch to __pm_runtime_put_autosuspend()

Quoted 2 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to

Please do not use "This commit/patch/change", but imperative mood. See longer explanation here:
https://elixir.bootlin.com/linux/v5.17.1/source/Documentation/process/submitting-patches.rst#L95

Quoted 13 lines

__pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/nfc/trf7970a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nfc/trf7970a.c +0 -0
index 9e1a34e23af2..4549f1960a27 100644

drivers/nfc/trf7970a.c static void trf7970a_switch_rf_off(struct trf7970a *trf) · line 1096

Quoted 5 lines
drivers/nfc/trf7970a.c +1 -1
@@ -1093,7 +1093,7 @@ static void trf7970a_switch_rf_off(struct trf7970a *trf)
 	trf->state = TRF7970A_ST_RF_OFF;
 
 	pm_runtime_mark_last_busy(trf->dev);
-	pm_runtime_put_autosuspend(trf->dev);
+	__pm_runtime_put_autosuspend(trf->dev);

But why? Nothing in commit msg explains why you cannot use the new API here.

Best regards,
Krzysztof

author maintainer
#49 lore raw

PATCH 32/51 PCI/portdrv: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/pci/pcie/portdrv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pcie/portdrv.c +1 -1
index 6af5e0425872..53f48065cc82 100644
@@ -711,7 +711,7 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
 		pm_runtime_set_autosuspend_delay(&dev->dev, 100);
 		pm_runtime_use_autosuspend(&dev->dev);
 		pm_runtime_mark_last_busy(&dev->dev);
-		pm_runtime_put_autosuspend(&dev->dev);
+		__pm_runtime_put_autosuspend(&dev->dev);
 		pm_runtime_allow(&dev->dev);
 	}
 
Signature · 1 line
2.39.5
#50 lore raw

Re: [PATCH 32/51] PCI/portdrv: Switch to __pm_runtime_put_autosuspend()

Quoted 15 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/pci/pcie/portdrv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pci/pcie/portdrv.c +0 -0
index 6af5e0425872..53f48065cc82 100644

drivers/pci/pcie/portdrv.c static int pcie_portdrv_probe(struct pci_dev *dev, · line 714

Quoted 5 lines
drivers/pci/pcie/portdrv.c +1 -1
@@ -711,7 +711,7 @@ static int pcie_portdrv_probe(struct pci_dev *dev,
 		pm_runtime_set_autosuspend_delay(&dev->dev, 100);
 		pm_runtime_use_autosuspend(&dev->dev);
 		pm_runtime_mark_last_busy(&dev->dev);
-		pm_runtime_put_autosuspend(&dev->dev);
+		__pm_runtime_put_autosuspend(&dev->dev);

Eh?

This call is preceeded by pm_runtime_mark_last_busy() so why all the extra churn when you really only want to remove that pm_runtime_mark_last_busy() call from above when it gets put inside the autosuspend call, no? Is extra last busy marking even dangerous so it could removed after the API change?

Signature · 1 line
 i.
author maintainer
#51 lore raw

PATCH 33/51 phy: motorola: phy-mapphone-mdm6600: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/phy/motorola/phy-mapphone-mdm6600.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/phy/motorola/phy-mapphone-mdm6600.c +2 -2
index 376d023a0aa9..5daf3217c7a0 100644
@@ -251,7 +251,7 @@ static irqreturn_t phy_mdm6600_wakeirq_thread(int irq, void *data)
 
 	/* Just wake-up and kick the autosuspend timer */
 	pm_runtime_mark_last_busy(ddata->dev);
-	pm_runtime_put_autosuspend(ddata->dev);
+	__pm_runtime_put_autosuspend(ddata->dev);
 
 	return IRQ_HANDLED;
 }
@@ -619,7 +619,7 @@ static int phy_mdm6600_probe(struct platform_device *pdev)
 
 idle:
 	pm_runtime_mark_last_busy(ddata->dev);
-	pm_runtime_put_autosuspend(ddata->dev);
+	__pm_runtime_put_autosuspend(ddata->dev);
 
 cleanup:
 	if (error < 0) {
Signature · 7 lines
2.39.5


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
author maintainer
#52 lore raw

PATCH 34/51 phy: ti: phy-twl4030-usb: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/phy/ti/phy-twl4030-usb.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/phy/ti/phy-twl4030-usb.c +4 -4
index 6b265992d988..e0492b61c9aa 100644
@@ -506,7 +506,7 @@ static int twl4030_phy_power_on(struct phy *phy)
 	pm_runtime_get_sync(twl->dev);
 	schedule_delayed_work(&twl->id_workaround_work, HZ);
 	pm_runtime_mark_last_busy(twl->dev);
-	pm_runtime_put_autosuspend(twl->dev);
+	__pm_runtime_put_autosuspend(twl->dev);
 
 	return 0;
 }
@@ -599,7 +599,7 @@ static irqreturn_t twl4030_usb_irq(int irq, void *_twl)
 			dev_dbg(twl->dev, "%s: cable disconnected %i\n",
 				__func__, status);
 			pm_runtime_mark_last_busy(twl->dev);
-			pm_runtime_put_autosuspend(twl->dev);
+			__pm_runtime_put_autosuspend(twl->dev);
 			twl->musb_mailbox_pending = true;
 		}
 	}
@@ -637,7 +637,7 @@ static int twl4030_phy_init(struct phy *phy)
 	twl->linkstat = MUSB_UNKNOWN;
 	schedule_delayed_work(&twl->id_workaround_work, HZ);
 	pm_runtime_mark_last_busy(twl->dev);
-	pm_runtime_put_autosuspend(twl->dev);
+	__pm_runtime_put_autosuspend(twl->dev);
 
 	return 0;
 }
@@ -782,7 +782,7 @@ static int twl4030_usb_probe(struct platform_device *pdev)
 		return err;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(twl->dev);
+	__pm_runtime_put_autosuspend(twl->dev);
 
 	dev_info(&pdev->dev, "Initialized TWL4030 USB module\n");
 	return 0;
Signature · 7 lines
2.39.5


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
author maintainer
#53 lore raw

PATCH 35/51 power: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/power/supply/bq24190_charger.c | 28 +++++++++++++-------------
 drivers/power/supply/twl4030_charger.c |  2 +-
 2 files changed, 15 insertions(+), 15 deletions(-)
drivers/power/supply/bq24190_charger.c +14 -14
index 2b393eb5c282..526387a5faeb 100644
@@ -502,7 +502,7 @@ static ssize_t bq24190_sysfs_show(struct device *dev,
 		count = sysfs_emit(buf, "%hhx\n", v);
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return count;
 }
@@ -533,7 +533,7 @@ static ssize_t bq24190_sysfs_store(struct device *dev,
 		count = ret;
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return count;
 }
@@ -560,7 +560,7 @@ static int bq24190_set_otg_vbus(struct bq24190_dev_info *bdi, bool enable)
 		ret = bq24190_charger_set_charge_type(bdi, &val);
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -597,7 +597,7 @@ static int bq24296_set_otg_vbus(struct bq24190_dev_info *bdi, bool enable)
 
 out:
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -630,7 +630,7 @@ static int bq24190_vbus_is_enabled(struct regulator_dev *dev)
 				BQ24190_REG_POC_CHG_CONFIG_SHIFT, &val);
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	if (ret)
 		return ret;
@@ -667,7 +667,7 @@ static int bq24296_vbus_is_enabled(struct regulator_dev *dev)
 				BQ24296_REG_POC_OTG_CONFIG_SHIFT, &val);
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	if (ret)
 		return ret;
@@ -1367,7 +1367,7 @@ static int bq24190_charger_get_property(struct power_supply *psy,
 	}
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -1409,7 +1409,7 @@ static int bq24190_charger_set_property(struct power_supply *psy,
 	}
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -1667,7 +1667,7 @@ static int bq24190_battery_get_property(struct power_supply *psy,
 	}
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -1698,7 +1698,7 @@ static int bq24190_battery_set_property(struct power_supply *psy,
 	}
 
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 
 	return ret;
 }
@@ -1846,7 +1846,7 @@ static irqreturn_t bq24190_irq_handler_thread(int irq, void *data)
 	}
 	bq24190_check_status(bdi);
 	pm_runtime_mark_last_busy(bdi->dev);
-	pm_runtime_put_autosuspend(bdi->dev);
+	__pm_runtime_put_autosuspend(bdi->dev);
 	bdi->irq_event = false;
 
 	return IRQ_HANDLED;
@@ -2148,7 +2148,7 @@ static int bq24190_probe(struct i2c_client *client)
 	enable_irq_wake(client->irq);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
@@ -2235,7 +2235,7 @@ static __maybe_unused int bq24190_pm_suspend(struct device *dev)
 
 	if (error >= 0) {
 		pm_runtime_mark_last_busy(bdi->dev);
-		pm_runtime_put_autosuspend(bdi->dev);
+		__pm_runtime_put_autosuspend(bdi->dev);
 	}
 
 	return 0;
@@ -2260,7 +2260,7 @@ static __maybe_unused int bq24190_pm_resume(struct device *dev)
 
 	if (error >= 0) {
 		pm_runtime_mark_last_busy(bdi->dev);
-		pm_runtime_put_autosuspend(bdi->dev);
+		__pm_runtime_put_autosuspend(bdi->dev);
 	}
 
 	/* Things may have changed while suspended so alert upper layer */
drivers/power/supply/twl4030_charger.c +1 -1
index f3f1a0862e93..1060a3b0d285 100644
@@ -513,7 +513,7 @@ static int twl4030_charger_enable_usb(struct twl4030_bci *bci, bool enable)
 					TWL4030_BCIMDKEY);
 		if (bci->usb_enabled) {
 			pm_runtime_mark_last_busy(bci->transceiver->dev);
-			pm_runtime_put_autosuspend(bci->transceiver->dev);
+			__pm_runtime_put_autosuspend(bci->transceiver->dev);
 			bci->usb_enabled = 0;
 		}
 		bci->usb_cur = 0;
Signature · 1 line
2.39.5
author maintainer
#54 lore raw

PATCH 36/51 pwm: img: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/pwm/pwm-img.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pwm/pwm-img.c +2 -2
index 71542956feca..9bd177ebad0d 100644
@@ -140,7 +140,7 @@ static int img_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	img_pwm_writel(imgchip, PWM_CH_CFG(pwm->hwpwm), val);
 
 	pm_runtime_mark_last_busy(pwmchip_parent(chip));
-	pm_runtime_put_autosuspend(pwmchip_parent(chip));
+	__pm_runtime_put_autosuspend(pwmchip_parent(chip));
 
 	return 0;
 }
@@ -176,7 +176,7 @@ static void img_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
 	img_pwm_writel(imgchip, PWM_CTRL_CFG, val);
 
 	pm_runtime_mark_last_busy(pwmchip_parent(chip));
-	pm_runtime_put_autosuspend(pwmchip_parent(chip));
+	__pm_runtime_put_autosuspend(pwmchip_parent(chip));
 }
 
 static int img_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,
Signature · 1 line
2.39.5
#55 lore raw

Re: [PATCH 36/51] pwm: img: Switch to __pm_runtime_put_autosuspend()

Hello,

[Cc += Rafeel + linux-pm]

Quoted 24 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/pwm/pwm-img.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/pwm/pwm-img.c +1 -1
index 71542956feca..9bd177ebad0d 100644
@@ -140,7 +140,7 @@ static int img_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm,
 	img_pwm_writel(imgchip, PWM_CH_CFG(pwm->hwpwm), val);
 
 	pm_runtime_mark_last_busy(pwmchip_parent(chip));
-	pm_runtime_put_autosuspend(pwmchip_parent(chip));
+	__pm_runtime_put_autosuspend(pwmchip_parent(chip));
 
 	return 0;
 }

drivers/pwm/pwm-img.c static void img_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm) · line 182

Quoted 8 lines
drivers/pwm/pwm-img.c +1 -1
@@ -176,7 +176,7 @@ static void img_pwm_disable(struct pwm_chip *chip, struct pwm_device *pwm)
 	img_pwm_writel(imgchip, PWM_CTRL_CFG, val);
 
 	pm_runtime_mark_last_busy(pwmchip_parent(chip));
-	pm_runtime_put_autosuspend(pwmchip_parent(chip));
+	__pm_runtime_put_autosuspend(pwmchip_parent(chip));
 }
 
 static int img_pwm_apply(struct pwm_chip *chip, struct pwm_device *pwm,

OK, there will soon be a function that does

	pm_runtime_mark_last_busy(dev);
	pm_runtime_put_autosuspend(dev);

(in today's semantic). Your plan is to call that new function pm_runtime_put_autosuspend().

I think the conversion would be simpler and maybe also semantically clearer if you call the new function e.g.

pm_runtime_mark_last_busy_put_autosuspend(...)

(ok, something shorter would be nice, too). Then you could add the function already today and don't have to go through each driver twice for the API change.

Alternatively only convert pm_runtime_put_autosuspend() calls that are not immediately preceeded by pm_runtime_mark_last_busy() and drop the mark bit after pm_runtime_put_autosuspend() was changed. (Assuming that calling pm_runtime_mark_last_busy() twice while the API conversion is ongoing doesn't hurt.)

Best regards
Uwe

author maintainer
#56 lore raw

PATCH 37/51 regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/regulator/stm32-vrefbuf.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/regulator/stm32-vrefbuf.c +6 -6
index 40855105dd33..870e568e5de9 100644
@@ -68,7 +68,7 @@ static int stm32_vrefbuf_enable(struct regulator_dev *rdev)
 	}
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return ret;
 }
@@ -88,7 +88,7 @@ static int stm32_vrefbuf_disable(struct regulator_dev *rdev)
 	writel_relaxed(val, priv->base + STM32_VREFBUF_CSR);
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return 0;
 }
@@ -105,7 +105,7 @@ static int stm32_vrefbuf_is_enabled(struct regulator_dev *rdev)
 	ret = readl_relaxed(priv->base + STM32_VREFBUF_CSR) & STM32_ENVR;
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return ret;
 }
@@ -126,7 +126,7 @@ static int stm32_vrefbuf_set_voltage_sel(struct regulator_dev *rdev,
 	writel_relaxed(val, priv->base + STM32_VREFBUF_CSR);
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return 0;
 }
@@ -145,7 +145,7 @@ static int stm32_vrefbuf_get_voltage_sel(struct regulator_dev *rdev)
 	ret = FIELD_GET(STM32_VRS, val);
 
 	pm_runtime_mark_last_busy(priv->dev);
-	pm_runtime_put_autosuspend(priv->dev);
+	__pm_runtime_put_autosuspend(priv->dev);
 
 	return ret;
 }
@@ -219,7 +219,7 @@ static int stm32_vrefbuf_probe(struct platform_device *pdev)
 	platform_set_drvdata(pdev, rdev);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
Signature · 1 line
2.39.5
maintainer
#57 lore raw

Re: [PATCH 37/51] regulator: stm32-vrefbuf: Switch to __pm_runtime_put_autosuspend()

Quoted 4 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

You've not copied me on the rest of the series so I don't know what's going on with dependencies. When sending a patch series it is important to ensure that all the various maintainers understand what the relationship between the patches as the expecation is that there will be interdependencies. Either copy everyone on the whole series or at least copy them on the cover letter and explain what's going on. If there are no strong interdependencies then it's generally simplest to just send the patches separately to avoid any possible confusion.

author maintainer
#58 lore raw

PATCH 38/51 remoteproc: omap: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/remoteproc/omap_remoteproc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/remoteproc/omap_remoteproc.c +3 -3
index 9ae2e831456d..e8f0e915ca3f 100644
@@ -552,7 +552,7 @@ static void omap_rproc_kick(struct rproc *rproc, int vqid)
 			ret);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 /**
@@ -653,7 +653,7 @@ static int omap_rproc_start(struct rproc *rproc)
 	pm_runtime_get_noresume(dev);
 	pm_runtime_enable(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
@@ -711,7 +711,7 @@ static int omap_rproc_stop(struct rproc *rproc)
 out:
 	/* schedule the next auto-suspend */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return ret;
 }
 
Signature · 1 line
2.39.5
author maintainer
#59 lore raw

PATCH 39/51 slimbus: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/slimbus/core.c      | 2 +-
 drivers/slimbus/messaging.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/slimbus/core.c +1 -1
index 65e5515f7555..0c1127854f85 100644
@@ -512,7 +512,7 @@ int slim_device_report_present(struct slim_controller *ctrl,
 
 slimbus_not_active:
 	pm_runtime_mark_last_busy(ctrl->dev);
-	pm_runtime_put_autosuspend(ctrl->dev);
+	__pm_runtime_put_autosuspend(ctrl->dev);
 	return ret;
 }
 EXPORT_SYMBOL_GPL(slim_device_report_present);
drivers/slimbus/messaging.c +2 -2
index 242570a5e565..992826556c64 100644
@@ -48,7 +48,7 @@ void slim_msg_response(struct slim_controller *ctrl, u8 *reply, u8 tid, u8 len)
 
 	/* Remove runtime-pm vote now that response was received for TID txn */
 	pm_runtime_mark_last_busy(ctrl->dev);
-	pm_runtime_put_autosuspend(ctrl->dev);
+	__pm_runtime_put_autosuspend(ctrl->dev);
 }
 EXPORT_SYMBOL_GPL(slim_msg_response);
 
@@ -171,7 +171,7 @@ int slim_do_transfer(struct slim_controller *ctrl, struct slim_msg_txn *txn)
 		 * if there was error during this transaction
 		 */
 		pm_runtime_mark_last_busy(ctrl->dev);
-		pm_runtime_put_autosuspend(ctrl->dev);
+		__pm_runtime_put_autosuspend(ctrl->dev);
 	}
 	return ret;
 }
Signature · 1 line
2.39.5
author maintainer
#60 lore raw

PATCH 40/51 soundwire: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/soundwire/bus.c            | 2 +-
 drivers/soundwire/cadence_master.c | 2 +-
 drivers/soundwire/qcom.c           | 6 +++---
 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/soundwire/bus.c +1 -1
index d1dc62c34f1c..ad07f21bcb87 100644
@@ -1812,7 +1812,7 @@ static int sdw_handle_slave_alerts(struct sdw_slave *slave)
 
 io_err:
 	pm_runtime_mark_last_busy(&slave->dev);
-	pm_runtime_put_autosuspend(&slave->dev);
+	__pm_runtime_put_autosuspend(&slave->dev);
 
 	return ret;
 }
drivers/soundwire/cadence_master.c +1 -1
index 05652e983539..3e75e07aee2f 100644
@@ -485,7 +485,7 @@ static int cdns_parity_error_injection(void *data, u64 value)
 	 * also result in Slave devices suspending.
 	 */
 	pm_runtime_mark_last_busy(bus->dev);
-	pm_runtime_put_autosuspend(bus->dev);
+	__pm_runtime_put_autosuspend(bus->dev);
 
 	return 0;
 }
drivers/soundwire/qcom.c +3 -3
index 2b403b14066c..f5313687ff5b 100644
@@ -657,7 +657,7 @@ static irqreturn_t qcom_swrm_wake_irq_handler(int irq, void *dev_id)
 	}
 
 	pm_runtime_mark_last_busy(ctrl->dev);
-	pm_runtime_put_autosuspend(ctrl->dev);
+	__pm_runtime_put_autosuspend(ctrl->dev);
 
 	return IRQ_HANDLED;
 }
@@ -1295,7 +1295,7 @@ static void qcom_swrm_shutdown(struct snd_pcm_substream *substream,
 
 	swrm_wait_for_wr_fifo_done(ctrl);
 	pm_runtime_mark_last_busy(ctrl->dev);
-	pm_runtime_put_autosuspend(ctrl->dev);
+	__pm_runtime_put_autosuspend(ctrl->dev);
 
 }
 
@@ -1477,7 +1477,7 @@ static int swrm_reg_show(struct seq_file *s_file, void *data)
 		seq_printf(s_file, "0x%.3x: 0x%.2x\n", reg, reg_val);
 	}
 	pm_runtime_mark_last_busy(ctrl->dev);
-	pm_runtime_put_autosuspend(ctrl->dev);
+	__pm_runtime_put_autosuspend(ctrl->dev);
 
 
 	return 0;
Signature · 1 line
2.39.5
author maintainer
#61 lore raw

PATCH 41/51 spi: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/spi/atmel-quadspi.c       | 10 +++++-----
 drivers/spi/spi-cadence-quadspi.c |  4 ++--
 drivers/spi/spi-cadence.c         |  2 +-
 drivers/spi/spi-dw-pci.c          |  2 +-
 drivers/spi/spi-fsl-espi.c        |  4 ++--
 drivers/spi/spi-fsl-lpspi.c       |  4 ++--
 drivers/spi/spi-imx.c             |  6 +++---
 drivers/spi/spi-mtk-nor.c         |  2 +-
 drivers/spi/spi-omap2-mcspi.c     |  6 +++---
 drivers/spi/spi-pxa2xx-pci.c      |  2 +-
 drivers/spi/spi-s3c64xx.c         |  6 +++---
 drivers/spi/spi-sprd.c            |  2 +-
 drivers/spi/spi-stm32-qspi.c      | 14 +++++++-------
 drivers/spi/spi-stm32.c           |  4 ++--
 drivers/spi/spi-ti-qspi.c         |  4 ++--
 drivers/spi/spi-zynqmp-gqspi.c    |  2 +-
 drivers/spi/spi.c                 |  6 +++---
 17 files changed, 40 insertions(+), 40 deletions(-)
drivers/spi/atmel-quadspi.c +5 -5
index 91108ddfaef2..0ea46b0f9476 100644
@@ -459,7 +459,7 @@ static int atmel_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
 
 pm_runtime_put:
 	pm_runtime_mark_last_busy(&aq->pdev->dev);
-	pm_runtime_put_autosuspend(&aq->pdev->dev);
+	__pm_runtime_put_autosuspend(&aq->pdev->dev);
 	return err;
 }
 
@@ -506,7 +506,7 @@ static int atmel_qspi_setup(struct spi_device *spi)
 	atmel_qspi_write(aq->scr, aq, QSPI_SCR);
 
 	pm_runtime_mark_last_busy(ctrl->dev.parent);
-	pm_runtime_put_autosuspend(ctrl->dev.parent);
+	__pm_runtime_put_autosuspend(ctrl->dev.parent);
 
 	return 0;
 }
@@ -568,7 +568,7 @@ static int atmel_qspi_set_cs_timing(struct spi_device *spi)
 	atmel_qspi_write(aq->mr, aq, QSPI_MR);
 
 	pm_runtime_mark_last_busy(ctrl->dev.parent);
-	pm_runtime_put_autosuspend(ctrl->dev.parent);
+	__pm_runtime_put_autosuspend(ctrl->dev.parent);
 
 	return 0;
 }
@@ -713,7 +713,7 @@ static int atmel_qspi_probe(struct platform_device *pdev)
 		goto disable_qspick;
 	}
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
@@ -801,7 +801,7 @@ static int __maybe_unused atmel_qspi_resume(struct device *dev)
 	atmel_qspi_write(aq->scr, aq, QSPI_SCR);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
drivers/spi/spi-cadence-quadspi.c +2 -2
index 0b45b7b2b3ab..fb8af087bd49 100644
@@ -1443,7 +1443,7 @@ static int cqspi_exec_mem_op(struct spi_mem *mem, const struct spi_mem_op *op)
 	ret = cqspi_mem_process(mem, op);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	if (ret)
 		dev_err(&mem->spi->dev, "operation failed with %d\n", ret);
@@ -1936,7 +1936,7 @@ static int cqspi_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 probe_setup_failed:
drivers/spi/spi-cadence.c +1 -1
index 9e56bde87768..48c4e84c085f 100644
@@ -663,7 +663,7 @@ static int cdns_spi_probe(struct platform_device *pdev)
 		ctlr->max_speed_hz = xspi->clk_rate / 4;
 		xspi->speed_hz = ctlr->max_speed_hz;
 		pm_runtime_mark_last_busy(&pdev->dev);
-		pm_runtime_put_autosuspend(&pdev->dev);
+		__pm_runtime_put_autosuspend(&pdev->dev);
 	} else {
 		ctlr->mode_bits |= SPI_NO_CS;
 		ctlr->target_abort = cdns_target_abort;
drivers/spi/spi-dw-pci.c +1 -1
index 7c8279d13f31..e46353b487f8 100644
@@ -140,7 +140,7 @@ static int dw_spi_pci_probe(struct pci_dev *pdev, const struct pci_device_id *en
 
 	pm_runtime_set_autosuspend_delay(&pdev->dev, 1000);
 	pm_runtime_use_autosuspend(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 	pm_runtime_allow(&pdev->dev);
 
 	return 0;
drivers/spi/spi-fsl-espi.c +2 -2
index 6a73eaa34cf7..0aaf6c5028d8 100644
@@ -514,7 +514,7 @@ static int fsl_espi_setup(struct spi_device *spi)
 	fsl_espi_setup_transfer(spi, NULL);
 
 	pm_runtime_mark_last_busy(espi->dev);
-	pm_runtime_put_autosuspend(espi->dev);
+	__pm_runtime_put_autosuspend(espi->dev);
 
 	return 0;
 }
@@ -727,7 +727,7 @@ static int fsl_espi_probe(struct device *dev, struct resource *mem,
 	dev_info(dev, "irq = %u\n", irq);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
drivers/spi/spi-fsl-lpspi.c +2 -2
index 40f5c8fdba76..20d0a22b921d 100644
@@ -234,7 +234,7 @@ static int lpspi_unprepare_xfer_hardware(struct spi_controller *controller)
 				spi_controller_get_devdata(controller);
 
 	pm_runtime_mark_last_busy(fsl_lpspi->dev);
-	pm_runtime_put_autosuspend(fsl_lpspi->dev);
+	__pm_runtime_put_autosuspend(fsl_lpspi->dev);
 
 	return 0;
 }
@@ -967,7 +967,7 @@ static int fsl_lpspi_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(fsl_lpspi->dev);
-	pm_runtime_put_autosuspend(fsl_lpspi->dev);
+	__pm_runtime_put_autosuspend(fsl_lpspi->dev);
 
 	return 0;
 
drivers/spi/spi-imx.c +3 -3
index adfd7d74a984..5c2f64c57f78 100644
@@ -1671,7 +1671,7 @@ spi_imx_prepare_message(struct spi_controller *controller, struct spi_message *m
 	ret = spi_imx->devtype_data->prepare_message(spi_imx, msg);
 	if (ret) {
 		pm_runtime_mark_last_busy(spi_imx->dev);
-		pm_runtime_put_autosuspend(spi_imx->dev);
+		__pm_runtime_put_autosuspend(spi_imx->dev);
 	}
 
 	return ret;
@@ -1683,7 +1683,7 @@ spi_imx_unprepare_message(struct spi_controller *controller, struct spi_message
 	struct spi_imx_data *spi_imx = spi_controller_get_devdata(controller);
 
 	pm_runtime_mark_last_busy(spi_imx->dev);
-	pm_runtime_put_autosuspend(spi_imx->dev);
+	__pm_runtime_put_autosuspend(spi_imx->dev);
 	return 0;
 }
 
@@ -1856,7 +1856,7 @@ static int spi_imx_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(spi_imx->dev);
-	pm_runtime_put_autosuspend(spi_imx->dev);
+	__pm_runtime_put_autosuspend(spi_imx->dev);
 
 	return ret;
 
drivers/spi/spi-mtk-nor.c +1 -1
index 85ab5ce96c4d..12a3bba77037 100644
@@ -919,7 +919,7 @@ static int mtk_nor_probe(struct platform_device *pdev)
 		goto err_probe;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_info(&pdev->dev, "spi frequency: %d Hz\n", sp->spi_freq);
 
drivers/spi/spi-omap2-mcspi.c +3 -3
index e2400a067a95..1c52157f926b 100644
@@ -272,7 +272,7 @@ static void omap2_mcspi_set_cs(struct spi_device *spi, bool enable)
 		mcspi_write_chconf0(spi, l);
 
 		pm_runtime_mark_last_busy(mcspi->dev);
-		pm_runtime_put_autosuspend(mcspi->dev);
+		__pm_runtime_put_autosuspend(mcspi->dev);
 	}
 }
 
@@ -1102,7 +1102,7 @@ static int omap2_mcspi_setup(struct spi_device *spi)
 		omap2_mcspi_cleanup(spi);
 
 	pm_runtime_mark_last_busy(mcspi->dev);
-	pm_runtime_put_autosuspend(mcspi->dev);
+	__pm_runtime_put_autosuspend(mcspi->dev);
 
 	return ret;
 }
@@ -1374,7 +1374,7 @@ static int omap2_mcspi_controller_setup(struct omap2_mcspi *mcspi)
 
 	omap2_mcspi_set_mode(ctlr);
 	pm_runtime_mark_last_busy(mcspi->dev);
-	pm_runtime_put_autosuspend(mcspi->dev);
+	__pm_runtime_put_autosuspend(mcspi->dev);
 	return 0;
 }
 
drivers/spi/spi-pxa2xx-pci.c +1 -1
index cc8dcf782399..b06716edc274 100644
@@ -304,7 +304,7 @@ static int pxa2xx_spi_pci_probe(struct pci_dev *dev,
 
 	pm_runtime_set_autosuspend_delay(&dev->dev, 50);
 	pm_runtime_use_autosuspend(&dev->dev);
-	pm_runtime_put_autosuspend(&dev->dev);
+	__pm_runtime_put_autosuspend(&dev->dev);
 	pm_runtime_allow(&dev->dev);
 
 	return 0;
drivers/spi/spi-s3c64xx.c +3 -3
index 389275dbc003..08cf10eaa4ee 100644
@@ -1044,14 +1044,14 @@ static int s3c64xx_spi_setup(struct spi_device *spi)
 	}
 
 	pm_runtime_mark_last_busy(&sdd->pdev->dev);
-	pm_runtime_put_autosuspend(&sdd->pdev->dev);
+	__pm_runtime_put_autosuspend(&sdd->pdev->dev);
 	s3c64xx_spi_set_cs(spi, false);
 
 	return 0;
 
 setup_exit:
 	pm_runtime_mark_last_busy(&sdd->pdev->dev);
-	pm_runtime_put_autosuspend(&sdd->pdev->dev);
+	__pm_runtime_put_autosuspend(&sdd->pdev->dev);
 	/* setup() returns with device de-selected */
 	s3c64xx_spi_set_cs(spi, false);
 
@@ -1383,7 +1383,7 @@ static int s3c64xx_spi_probe(struct platform_device *pdev)
 		mem_res, sdd->fifo_depth);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
drivers/spi/spi-sprd.c +1 -1
index ae794058b381..e380981e12f3 100644
@@ -983,7 +983,7 @@ static int sprd_spi_probe(struct platform_device *pdev)
 		goto err_rpm_put;
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
drivers/spi/spi-stm32-qspi.c +7 -7
index 540b6948b24d..823da8ec4fd8 100644
@@ -469,7 +469,7 @@ static int stm32_qspi_poll_status(struct spi_mem *mem, const struct spi_mem_op *
 	mutex_unlock(&qspi->lock);
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret;
 }
@@ -493,7 +493,7 @@ static int stm32_qspi_exec_op(struct spi_mem *mem, const struct spi_mem_op *op)
 	mutex_unlock(&qspi->lock);
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret;
 }
@@ -549,7 +549,7 @@ static ssize_t stm32_qspi_dirmap_read(struct spi_mem_dirmap_desc *desc,
 	mutex_unlock(&qspi->lock);
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret ?: len;
 }
@@ -633,7 +633,7 @@ static int stm32_qspi_transfer_one_message(struct spi_controller *ctrl,
 	spi_finalize_current_message(ctrl);
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 
 	return ret;
 }
@@ -690,7 +690,7 @@ static int stm32_qspi_setup(struct spi_device *spi)
 	mutex_unlock(&qspi->lock);
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 
 	return 0;
 }
@@ -864,7 +864,7 @@ static int stm32_qspi_probe(struct platform_device *pdev)
 		goto err_pm_runtime_free;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 
@@ -944,7 +944,7 @@ static int __maybe_unused stm32_qspi_resume(struct device *dev)
 	writel_relaxed(qspi->dcr_reg, qspi->io_base + QSPI_DCR);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
drivers/spi/spi-stm32.c +2 -2
index f2dd8ab12df8..6f8549bdd198 100644
@@ -2233,7 +2233,7 @@ static int stm32_spi_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	dev_info(&pdev->dev, "driver initialized (%s mode)\n",
 		 STM32_SPI_HOST_MODE(spi) ? "host" : "device");
@@ -2342,7 +2342,7 @@ static int __maybe_unused stm32_spi_resume(struct device *dev)
 	spi->cfg->config(spi);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
drivers/spi/spi-ti-qspi.c +2 -2
index dfd4a7948c03..5ec4413304db 100644
@@ -159,7 +159,7 @@ static int ti_qspi_setup(struct spi_device *spi)
 	}
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	ret = pm_runtime_put_autosuspend(qspi->dev);
+	ret = __pm_runtime_put_autosuspend(qspi->dev);
 	if (ret < 0) {
 		dev_err(qspi->dev, "pm_runtime_put_autosuspend() failed\n");
 		return ret;
@@ -196,7 +196,7 @@ static void ti_qspi_setup_clk(struct ti_qspi *qspi, u32 speed_hz)
 	}
 
 	pm_runtime_mark_last_busy(qspi->dev);
-	pm_runtime_put_autosuspend(qspi->dev);
+	__pm_runtime_put_autosuspend(qspi->dev);
 }
 
 static void ti_qspi_restore_ctx(struct ti_qspi *qspi)
drivers/spi/spi-zynqmp-gqspi.c +1 -1
index 84cce78e4f2e..da771e4153aa 100644
@@ -1345,7 +1345,7 @@ static int zynqmp_qspi_probe(struct platform_device *pdev)
 	}
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 
drivers/spi/spi.c +3 -3
index 073ffae97767..987e3d582740 100644
@@ -1726,7 +1726,7 @@ static void spi_idle_runtime_pm(struct spi_controller *ctlr)
 {
 	if (ctlr->auto_runtime_pm) {
 		pm_runtime_mark_last_busy(ctlr->dev.parent);
-		pm_runtime_put_autosuspend(ctlr->dev.parent);
+		__pm_runtime_put_autosuspend(ctlr->dev.parent);
 	}
 }
 
@@ -3860,7 +3860,7 @@ static int spi_set_cs_timing(struct spi_device *spi)
 
 			status = spi->controller->set_cs_timing(spi);
 			pm_runtime_mark_last_busy(parent);
-			pm_runtime_put_autosuspend(parent);
+			__pm_runtime_put_autosuspend(parent);
 		} else {
 			status = spi->controller->set_cs_timing(spi);
 		}
@@ -3995,7 +3995,7 @@ int spi_setup(struct spi_device *spi)
 
 		spi_set_cs(spi, false, true);
 		pm_runtime_mark_last_busy(spi->controller->dev.parent);
-		pm_runtime_put_autosuspend(spi->controller->dev.parent);
+		__pm_runtime_put_autosuspend(spi->controller->dev.parent);
 	} else {
 		spi_set_cs(spi, false, true);
 	}
Signature · 1 line
2.39.5
author maintainer
#62 lore raw

PATCH 42/51 staging: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/staging/greybus/gbphy.h       | 2 +-
 drivers/staging/media/rkvdec/rkvdec.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/staging/greybus/gbphy.h +1 -1
index d4a225b76338..afa0c2a1e683 100644
@@ -86,7 +86,7 @@ static inline void gbphy_runtime_put_autosuspend(struct gbphy_device *gbphy_dev)
 	struct device *dev = &gbphy_dev->dev;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static inline void gbphy_runtime_get_noresume(struct gbphy_device *gbphy_dev)
drivers/staging/media/rkvdec/rkvdec.c +1 -1
index ac398b5a9736..91c565f9a446 100644
@@ -660,7 +660,7 @@ static void rkvdec_job_finish(struct rkvdec_ctx *ctx,
 	struct rkvdec_dev *rkvdec = ctx->dev;
 
 	pm_runtime_mark_last_busy(rkvdec->dev);
-	pm_runtime_put_autosuspend(rkvdec->dev);
+	__pm_runtime_put_autosuspend(rkvdec->dev);
 	rkvdec_job_finish_no_pm(ctx, result);
 }
 
Signature · 1 line
2.39.5
author maintainer
#63 lore raw

PATCH 43/51 thunderbolt: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/thunderbolt/debugfs.c   | 22 +++++++++++-----------
 drivers/thunderbolt/domain.c    |  4 ++--
 drivers/thunderbolt/icm.c       | 14 +++++++-------
 drivers/thunderbolt/nhi.c       |  2 +-
 drivers/thunderbolt/retimer.c   |  4 ++--
 drivers/thunderbolt/switch.c    |  6 +++---
 drivers/thunderbolt/tb.c        | 18 +++++++++---------
 drivers/thunderbolt/usb4_port.c |  4 ++--
 8 files changed, 37 insertions(+), 37 deletions(-)
drivers/thunderbolt/debugfs.c +11 -11
index 350310bd0fee..c9dbd7e8c3b6 100644
@@ -209,7 +209,7 @@ static ssize_t regs_write(struct tb_switch *sw, struct tb_port *port,
 
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 	free_page((unsigned long)buf);
 
 	return ret < 0 ? ret : count;
@@ -341,7 +341,7 @@ static ssize_t port_sb_regs_write(struct file *file, const char __user *user_buf
 	mutex_unlock(&tb->lock);
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 	free_page((unsigned long)buf);
 
 	return ret < 0 ? ret : count;
@@ -374,7 +374,7 @@ static ssize_t retimer_sb_regs_write(struct file *file,
 	mutex_unlock(&tb->lock);
 out:
 	pm_runtime_mark_last_busy(&rt->dev);
-	pm_runtime_put_autosuspend(&rt->dev);
+	__pm_runtime_put_autosuspend(&rt->dev);
 	free_page((unsigned long)buf);
 
 	return ret < 0 ? ret : count;
@@ -1113,7 +1113,7 @@ static int margining_run_write(void *data, u64 val)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
@@ -1647,7 +1647,7 @@ static ssize_t counters_write(struct file *file, const char __user *user_buf,
 
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 	free_page((unsigned long)buf);
 
 	return ret < 0 ? ret : count;
@@ -1842,7 +1842,7 @@ static int port_regs_show(struct seq_file *s, void *not_used)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -1946,7 +1946,7 @@ static int switch_regs_show(struct seq_file *s, void *not_used)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -2007,7 +2007,7 @@ static int path_show(struct seq_file *s, void *not_used)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -2061,7 +2061,7 @@ static int counters_show(struct seq_file *s, void *not_used)
 
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -2115,7 +2115,7 @@ static int port_sb_regs_show(struct seq_file *s, void *not_used)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -2228,7 +2228,7 @@ static int retimer_sb_regs_show(struct seq_file *s, void *not_used)
 	mutex_unlock(&tb->lock);
 out_rpm_put:
 	pm_runtime_mark_last_busy(&rt->dev);
-	pm_runtime_put_autosuspend(&rt->dev);
+	__pm_runtime_put_autosuspend(&rt->dev);
 
 	return ret;
 }
drivers/thunderbolt/domain.c +2 -2
index 144d0232a70c..a9106881f822 100644
@@ -151,7 +151,7 @@ static ssize_t boot_acl_show(struct device *dev, struct device_attribute *attr,
 
 out:
 	pm_runtime_mark_last_busy(&tb->dev);
-	pm_runtime_put_autosuspend(&tb->dev);
+	__pm_runtime_put_autosuspend(&tb->dev);
 	kfree(uuids);
 
 	return ret;
@@ -223,7 +223,7 @@ static ssize_t boot_acl_store(struct device *dev, struct device_attribute *attr,
 
 err_rpm_put:
 	pm_runtime_mark_last_busy(&tb->dev);
-	pm_runtime_put_autosuspend(&tb->dev);
+	__pm_runtime_put_autosuspend(&tb->dev);
 err_free_acl:
 	kfree(acl);
 err_free_str:
drivers/thunderbolt/icm.c +7 -7
index 7859bccc592d..3ed8703316ba 100644
@@ -367,7 +367,7 @@ static void icm_veto_end(struct tb *tb)
 		icm->veto = false;
 		/* Allow the domain suspend now */
 		pm_runtime_mark_last_busy(&tb->dev);
-		pm_runtime_put_autosuspend(&tb->dev);
+		__pm_runtime_put_autosuspend(&tb->dev);
 	}
 }
 
@@ -697,7 +697,7 @@ static void add_xdomain(struct tb_switch *sw, u64 route,
 
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 }
 
 static void update_xdomain(struct tb_xdomain *xd, u64 route, u8 link)
@@ -859,7 +859,7 @@ icm_fr_device_connected(struct tb *tb, const struct icm_pkg_header *hdr)
 	}
 
 	pm_runtime_mark_last_busy(&parent_sw->dev);
-	pm_runtime_put_autosuspend(&parent_sw->dev);
+	__pm_runtime_put_autosuspend(&parent_sw->dev);
 
 	tb_switch_put(parent_sw);
 }
@@ -893,7 +893,7 @@ icm_fr_device_disconnected(struct tb *tb, const struct icm_pkg_header *hdr)
 	remove_switch(sw);
 
 	pm_runtime_mark_last_busy(sw->dev.parent);
-	pm_runtime_put_autosuspend(sw->dev.parent);
+	__pm_runtime_put_autosuspend(sw->dev.parent);
 
 	tb_switch_put(sw);
 }
@@ -1285,7 +1285,7 @@ __icm_tr_device_connected(struct tb *tb, const struct icm_pkg_header *hdr,
 	}
 
 	pm_runtime_mark_last_busy(&parent_sw->dev);
-	pm_runtime_put_autosuspend(&parent_sw->dev);
+	__pm_runtime_put_autosuspend(&parent_sw->dev);
 
 	tb_switch_put(parent_sw);
 }
@@ -1316,7 +1316,7 @@ icm_tr_device_disconnected(struct tb *tb, const struct icm_pkg_header *hdr)
 	remove_switch(sw);
 
 	pm_runtime_mark_last_busy(sw->dev.parent);
-	pm_runtime_put_autosuspend(sw->dev.parent);
+	__pm_runtime_put_autosuspend(sw->dev.parent);
 
 	tb_switch_put(sw);
 }
@@ -2045,7 +2045,7 @@ static void remove_unplugged_switch(struct tb_switch *sw)
 	tb_switch_remove(sw);
 
 	pm_runtime_mark_last_busy(parent);
-	pm_runtime_put_autosuspend(parent);
+	__pm_runtime_put_autosuspend(parent);
 
 	put_device(parent);
 }
drivers/thunderbolt/nhi.c +1 -1
index 7af2642b97cb..d46fab8a7a33 100644
@@ -1408,7 +1408,7 @@ static int nhi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	pm_runtime_allow(&pdev->dev);
 	pm_runtime_set_autosuspend_delay(&pdev->dev, TB_AUTOSUSPEND_DELAY);
 	pm_runtime_use_autosuspend(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return 0;
 }
drivers/thunderbolt/retimer.c +2 -2
index 721319329afa..3818f0bb2512 100644
@@ -54,7 +54,7 @@ static int nvm_read(void *priv, unsigned int offset, void *val, size_t bytes)
 
 out:
 	pm_runtime_mark_last_busy(&rt->dev);
-	pm_runtime_put_autosuspend(&rt->dev);
+	__pm_runtime_put_autosuspend(&rt->dev);
 
 	return ret;
 }
@@ -304,7 +304,7 @@ static ssize_t nvm_authenticate_store(struct device *dev,
 	mutex_unlock(&rt->tb->lock);
 exit_rpm:
 	pm_runtime_mark_last_busy(&rt->dev);
-	pm_runtime_put_autosuspend(&rt->dev);
+	__pm_runtime_put_autosuspend(&rt->dev);
 
 	if (ret)
 		return ret;
drivers/thunderbolt/switch.c +3 -3
index 6a2116cbb06f..126e8ddd26f4 100644
@@ -319,7 +319,7 @@ static int nvm_read(void *priv, unsigned int offset, void *val, size_t bytes)
 
 out:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
@@ -1847,7 +1847,7 @@ static ssize_t authorized_store(struct device *dev,
 	pm_runtime_get_sync(&sw->dev);
 	ret = tb_switch_set_authorized(sw, val);
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret ? ret : count;
 }
@@ -2079,7 +2079,7 @@ static ssize_t nvm_authenticate_sysfs(struct device *dev, const char *buf,
 	mutex_unlock(&sw->tb->lock);
 exit_rpm:
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 	return ret;
 }
drivers/thunderbolt/tb.c +9 -9
index 10e719dd837c..7a1d80ce3666 100644
@@ -1217,7 +1217,7 @@ static void tb_scan_switch(struct tb_switch *sw)
 		tb_scan_port(port);
 
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 }
 
 /*
@@ -1349,7 +1349,7 @@ static void tb_scan_port(struct tb_port *port)
 out_rpm_put:
 	if (port->usb4) {
 		pm_runtime_mark_last_busy(&port->usb4->dev);
-		pm_runtime_put_autosuspend(&port->usb4->dev);
+		__pm_runtime_put_autosuspend(&port->usb4->dev);
 	}
 }
 
@@ -1674,9 +1674,9 @@ static void tb_deactivate_and_free_tunnel(struct tb_tunnel *tunnel)
 		tb_configure_sym(tb, src_port, dst_port, true);
 		/* Now we can allow the domain to runtime suspend again */
 		pm_runtime_mark_last_busy(&dst_port->sw->dev);
-		pm_runtime_put_autosuspend(&dst_port->sw->dev);
+		__pm_runtime_put_autosuspend(&dst_port->sw->dev);
 		pm_runtime_mark_last_busy(&src_port->sw->dev);
-		pm_runtime_put_autosuspend(&src_port->sw->dev);
+		__pm_runtime_put_autosuspend(&src_port->sw->dev);
 		fallthrough;
 
 	case TB_TUNNEL_USB3:
@@ -1932,9 +1932,9 @@ static bool tb_tunnel_one_dp(struct tb *tb, struct tb_port *in,
 	tb_switch_dealloc_dp_resource(in->sw, in);
 err_rpm_put:
 	pm_runtime_mark_last_busy(&out->sw->dev);
-	pm_runtime_put_autosuspend(&out->sw->dev);
+	__pm_runtime_put_autosuspend(&out->sw->dev);
 	pm_runtime_mark_last_busy(&in->sw->dev);
-	pm_runtime_put_autosuspend(&in->sw->dev);
+	__pm_runtime_put_autosuspend(&in->sw->dev);
 
 	return false;
 }
@@ -2364,7 +2364,7 @@ static void tb_handle_hotplug(struct work_struct *work)
 	}
 
 	pm_runtime_mark_last_busy(&sw->dev);
-	pm_runtime_put_autosuspend(&sw->dev);
+	__pm_runtime_put_autosuspend(&sw->dev);
 
 put_sw:
 	tb_switch_put(sw);
@@ -2372,7 +2372,7 @@ static void tb_handle_hotplug(struct work_struct *work)
 	mutex_unlock(&tb->lock);
 
 	pm_runtime_mark_last_busy(&tb->dev);
-	pm_runtime_put_autosuspend(&tb->dev);
+	__pm_runtime_put_autosuspend(&tb->dev);
 
 	kfree(ev);
 }
@@ -2673,7 +2673,7 @@ static void tb_handle_dp_bandwidth_request(struct work_struct *work)
 	mutex_unlock(&tb->lock);
 
 	pm_runtime_mark_last_busy(&tb->dev);
-	pm_runtime_put_autosuspend(&tb->dev);
+	__pm_runtime_put_autosuspend(&tb->dev);
 
 	kfree(ev);
 }
drivers/thunderbolt/usb4_port.c +2 -2
index 5150879888ca..9b71ec355cd5 100644
@@ -158,7 +158,7 @@ static ssize_t offline_store(struct device *dev,
 	mutex_unlock(&tb->lock);
 out_rpm:
 	pm_runtime_mark_last_busy(&usb4->dev);
-	pm_runtime_put_autosuspend(&usb4->dev);
+	__pm_runtime_put_autosuspend(&usb4->dev);
 
 	return ret ? ret : count;
 }
@@ -200,7 +200,7 @@ static ssize_t rescan_store(struct device *dev,
 	mutex_unlock(&tb->lock);
 out_rpm:
 	pm_runtime_mark_last_busy(&usb4->dev);
-	pm_runtime_put_autosuspend(&usb4->dev);
+	__pm_runtime_put_autosuspend(&usb4->dev);
 
 	return ret ? ret : count;
 }
Signature · 1 line
2.39.5
maintainer Acked-by on v1 43/51
#64 lore raw

Re: [PATCH 43/51] thunderbolt: Switch to __pm_runtime_put_autosuspend()

Quoted 6 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

author maintainer
#65 lore raw

PATCH 44/51 serial: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/tty/serial/8250/8250_omap.c | 18 +++++++++---------
 drivers/tty/serial/8250/8250_port.c |  4 ++--
 drivers/tty/serial/fsl_lpuart.c     |  2 +-
 drivers/tty/serial/serial_core.c    |  2 +-
 drivers/tty/serial/uartlite.c       |  4 ++--
 drivers/tty/serial/xilinx_uartps.c  |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)
drivers/tty/serial/8250/8250_omap.c +9 -9
index 88b58f44e4e9..8bd8284e591e 100644
@@ -208,7 +208,7 @@ static void omap8250_set_mctrl(struct uart_port *port, unsigned int mctrl)
 	__omap8250_set_mctrl(port, mctrl);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 }
 
 /*
@@ -510,7 +510,7 @@ static void omap_8250_set_termios(struct uart_port *port,
 
 	uart_port_unlock_irq(&up->port);
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 
 	/* calculate wakeup latency constraint */
 	priv->calc_latency = USEC_PER_SEC * 64 * 8 / baud;
@@ -548,7 +548,7 @@ static void omap_8250_pm(struct uart_port *port, unsigned int state,
 	uart_port_unlock_irq(port);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 }
 
 static void omap_serial_fill_features_erratas(struct uart_8250_port *up,
@@ -767,7 +767,7 @@ static int omap_8250_startup(struct uart_port *port)
 	enable_irq(up->port.irq);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 	return 0;
 }
 
@@ -805,7 +805,7 @@ static void omap_8250_shutdown(struct uart_port *port)
 	serial_out(up, UART_FCR, UART_FCR_CLEAR_RCVR | UART_FCR_CLEAR_XMIT);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 }
 
 static void omap_8250_throttle(struct uart_port *port)
@@ -821,7 +821,7 @@ static void omap_8250_throttle(struct uart_port *port)
 	uart_port_unlock_irqrestore(port, flags);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 }
 
 static void omap_8250_unthrottle(struct uart_port *port)
@@ -843,7 +843,7 @@ static void omap_8250_unthrottle(struct uart_port *port)
 	uart_port_unlock_irqrestore(port, flags);
 
 	pm_runtime_mark_last_busy(port->dev);
-	pm_runtime_put_autosuspend(port->dev);
+	__pm_runtime_put_autosuspend(port->dev);
 }
 
 static int omap8250_rs485_config(struct uart_port *port,
@@ -1594,7 +1594,7 @@ static int omap8250_probe(struct platform_device *pdev)
 	}
 	priv->line = ret;
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 	return 0;
 err:
 	pm_runtime_dont_use_autosuspend(&pdev->dev);
@@ -1682,7 +1682,7 @@ static int omap8250_resume(struct device *dev)
 	serial8250_resume_port(priv->line);
 	/* Paired with pm_runtime_resume_and_get() in omap8250_suspend() */
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
drivers/tty/serial/8250/8250_port.c +2 -2
index 3509af7dc52b..a94f30fac856 100644
@@ -510,7 +510,7 @@ void serial8250_rpm_put(struct uart_8250_port *p)
 	if (!(p->capabilities & UART_CAP_RPM))
 		return;
 	pm_runtime_mark_last_busy(p->port.dev);
-	pm_runtime_put_autosuspend(p->port.dev);
+	__pm_runtime_put_autosuspend(p->port.dev);
 }
 EXPORT_SYMBOL_GPL(serial8250_rpm_put);
 
@@ -654,7 +654,7 @@ void serial8250_rpm_put_tx(struct uart_8250_port *p)
 	if (!rpm_active)
 		return;
 	pm_runtime_mark_last_busy(p->port.dev);
-	pm_runtime_put_autosuspend(p->port.dev);
+	__pm_runtime_put_autosuspend(p->port.dev);
 }
 EXPORT_SYMBOL_GPL(serial8250_rpm_put_tx);
 
drivers/tty/serial/fsl_lpuart.c +1 -1
index 77efa7ee6eda..5bf0d6d6f417 100644
@@ -825,7 +825,7 @@ lpuart_uart_pm(struct uart_port *port, unsigned int state, unsigned int oldstate
 	switch (state) {
 	case UART_PM_STATE_OFF:
 		pm_runtime_mark_last_busy(port->dev);
-		pm_runtime_put_autosuspend(port->dev);
+		__pm_runtime_put_autosuspend(port->dev);
 		break;
 	default:
 		pm_runtime_get_sync(port->dev);
drivers/tty/serial/serial_core.c +1 -1
index d94d73e45fb6..906254bed9fa 100644
@@ -159,7 +159,7 @@ static void __uart_start(struct uart_state *state)
 	if (!pm_runtime_enabled(port->dev) || pm_runtime_active(&port_dev->dev))
 		port->ops->start_tx(port);
 	pm_runtime_mark_last_busy(&port_dev->dev);
-	pm_runtime_put_autosuspend(&port_dev->dev);
+	__pm_runtime_put_autosuspend(&port_dev->dev);
 }
 
 static void uart_start(struct tty_struct *tty)
drivers/tty/serial/uartlite.c +2 -2
index 68357ac8ffe3..a7ecdcbce6d3 100644
@@ -423,7 +423,7 @@ static void ulite_pm(struct uart_port *port, unsigned int state,
 			dev_err(port->dev, "Failed to enable clocks\n");
 	} else {
 		pm_runtime_mark_last_busy(port->dev);
-		pm_runtime_put_autosuspend(port->dev);
+		__pm_runtime_put_autosuspend(port->dev);
 	}
 }
 
@@ -893,7 +893,7 @@ static int ulite_probe(struct platform_device *pdev)
 	ret = ulite_assign(&pdev->dev, id, res->start, irq, pdata);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	return ret;
 }
drivers/tty/serial/xilinx_uartps.c +1 -1
index 777392914819..a06afaa314d3 100644
@@ -1241,7 +1241,7 @@ static void cdns_uart_pm(struct uart_port *port, unsigned int state,
 	switch (state) {
 	case UART_PM_STATE_OFF:
 		pm_runtime_mark_last_busy(port->dev);
-		pm_runtime_put_autosuspend(port->dev);
+		__pm_runtime_put_autosuspend(port->dev);
 		break;
 	default:
 		pm_runtime_get_sync(port->dev);
Signature · 1 line
2.39.5
author maintainer
#66 lore raw

PATCH 45/51 usb: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/usb/cdns3/cdns3-gadget.c            |  2 +-
 drivers/usb/cdns3/cdnsp-gadget.c            |  2 +-
 drivers/usb/chipidea/core.c                 |  2 +-
 drivers/usb/chipidea/otg_fsm.c              |  2 +-
 drivers/usb/dwc3/core.c                     |  2 +-
 drivers/usb/dwc3/dwc3-am62.c                |  2 +-
 drivers/usb/dwc3/dwc3-imx8mp.c              |  2 +-
 drivers/usb/gadget/udc/cdns2/cdns2-gadget.c |  2 +-
 drivers/usb/host/xhci-mtk.c                 |  2 +-
 drivers/usb/misc/apple-mfi-fastcharge.c     |  2 +-
 drivers/usb/mtu3/mtu3_plat.c                |  2 +-
 drivers/usb/musb/musb_core.c                | 10 +++++-----
 drivers/usb/musb/musb_debugfs.c             | 10 +++++-----
 drivers/usb/musb/musb_dsps.c                |  2 +-
 drivers/usb/musb/musb_gadget.c              |  8 ++++----
 drivers/usb/musb/omap2430.c                 |  2 +-
 16 files changed, 27 insertions(+), 27 deletions(-)
drivers/usb/cdns3/cdns3-gadget.c +1 -1
index fd1beb10bba7..660bbf6d9f17 100644
@@ -3250,7 +3250,7 @@ static void cdns3_gadget_exit(struct cdns *cdns)
 
 
 	pm_runtime_mark_last_busy(cdns->dev);
-	pm_runtime_put_autosuspend(cdns->dev);
+	__pm_runtime_put_autosuspend(cdns->dev);
 
 	usb_del_gadget(&priv_dev->gadget);
 	devm_free_irq(cdns->dev, cdns->dev_irq, priv_dev);
drivers/usb/cdns3/cdnsp-gadget.c +1 -1
index 4a3f0f958256..47975436eec0 100644
@@ -1948,7 +1948,7 @@ static void cdnsp_gadget_exit(struct cdns *cdns)
 
 	devm_free_irq(pdev->dev, cdns->dev_irq, pdev);
 	pm_runtime_mark_last_busy(cdns->dev);
-	pm_runtime_put_autosuspend(cdns->dev);
+	__pm_runtime_put_autosuspend(cdns->dev);
 	usb_del_gadget_udc(&pdev->gadget);
 	cdnsp_gadget_free_endpoints(pdev);
 	cdnsp_mem_cleanup(pdev);
drivers/usb/chipidea/core.c +1 -1
index 835bf2428dc6..285cbb430e01 100644
@@ -1371,7 +1371,7 @@ static int ci_controller_resume(struct device *dev)
 	if (ci->wakeup_int) {
 		ci->wakeup_int = false;
 		pm_runtime_mark_last_busy(ci->dev);
-		pm_runtime_put_autosuspend(ci->dev);
+		__pm_runtime_put_autosuspend(ci->dev);
 		enable_irq(ci->irq);
 		if (ci_otg_is_fsm_mode(ci))
 			ci_otg_fsm_wakeup_by_srp(ci);
drivers/usb/chipidea/otg_fsm.c +1 -1
index c17516c29b63..21d0eb6eed57 100644
@@ -631,7 +631,7 @@ int ci_otg_fsm_work(struct ci_hdrc *ci)
 			}
 		} else if (ci->fsm.otg->state == OTG_STATE_A_HOST) {
 			pm_runtime_mark_last_busy(ci->dev);
-			pm_runtime_put_autosuspend(ci->dev);
+			__pm_runtime_put_autosuspend(ci->dev);
 			return 0;
 		}
 	}
drivers/usb/dwc3/core.c +1 -1
index 9eb085f359ce..ec460e70082f 100644
@@ -265,7 +265,7 @@ static void __dwc3_set_mode(struct work_struct *work)
 
 out:
 	pm_runtime_mark_last_busy(dwc->dev);
-	pm_runtime_put_autosuspend(dwc->dev);
+	__pm_runtime_put_autosuspend(dwc->dev);
 	mutex_unlock(&dwc->mutex);
 }
 
drivers/usb/dwc3/dwc3-am62.c +1 -1
index fad151e78fd6..dcc14c406f7f 100644
@@ -282,7 +282,7 @@ static int dwc3_ti_probe(struct platform_device *pdev)
 	pm_runtime_set_autosuspend_delay(dev, DWC3_AM62_AUTOSUSPEND_DELAY);
 	pm_runtime_use_autosuspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	return 0;
 
 err_pm_disable:
drivers/usb/dwc3/dwc3-imx8mp.c +1 -1
index 64c0cd1995aa..c3b354f074c1 100644
@@ -306,7 +306,7 @@ static int dwc3_imx8mp_resume(struct dwc3_imx8mp *dwc3_imx, pm_message_t msg)
 		dwc3_imx->wakeup_pending = false;
 		if (dwc->current_dr_role == DWC3_GCTL_PRTCAP_DEVICE) {
 			pm_runtime_mark_last_busy(dwc->dev);
-			pm_runtime_put_autosuspend(dwc->dev);
+			__pm_runtime_put_autosuspend(dwc->dev);
 		} else {
 			/*
 			 * Add wait for xhci switch from suspend
drivers/usb/gadget/udc/cdns2/cdns2-gadget.c +1 -1
index 62fce42ef2da..aabe325069c6 100644
@@ -2415,7 +2415,7 @@ int cdns2_gadget_resume(struct cdns2_device *pdev, bool hibernated)
 void cdns2_gadget_remove(struct cdns2_device *pdev)
 {
 	pm_runtime_mark_last_busy(pdev->dev);
-	pm_runtime_put_autosuspend(pdev->dev);
+	__pm_runtime_put_autosuspend(pdev->dev);
 
 	usb_del_gadget(&pdev->gadget);
 	cdns2_free_all_eps(pdev);
drivers/usb/host/xhci-mtk.c +1 -1
index 3252e3d2d79c..c9d408860fce 100644
@@ -671,7 +671,7 @@ static int xhci_mtk_probe(struct platform_device *pdev)
 
 	device_enable_async_suspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	pm_runtime_forbid(dev);
 
 	return 0;
drivers/usb/misc/apple-mfi-fastcharge.c +1 -1
index ac8695195c13..37be7548dc75 100644
@@ -134,7 +134,7 @@ static int apple_mfi_fc_set_property(struct power_supply *psy,
 	}
 
 	pm_runtime_mark_last_busy(&mfi->udev->dev);
-	pm_runtime_put_autosuspend(&mfi->udev->dev);
+	__pm_runtime_put_autosuspend(&mfi->udev->dev);
 
 	return ret;
 }
drivers/usb/mtu3/mtu3_plat.c +1 -1
index 6858ed9fc3b2..51ab1d360bf7 100644
@@ -432,7 +432,7 @@ static int mtu3_probe(struct platform_device *pdev)
 
 	device_enable_async_suspend(dev);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 	pm_runtime_forbid(dev);
 
 	return 0;
drivers/usb/musb/musb_core.c +5 -5
index b24adb5b399f..f92b3a119f75 100644
@@ -2031,7 +2031,7 @@ static void musb_pm_runtime_check_session(struct musb *musb)
 			break;
 		trace_musb_state(musb, devctl, "Allow PM on possible host mode disconnect");
 		pm_runtime_mark_last_busy(musb->controller);
-		pm_runtime_put_autosuspend(musb->controller);
+		__pm_runtime_put_autosuspend(musb->controller);
 		musb->session = false;
 		return;
 	default:
@@ -2063,7 +2063,7 @@ static void musb_pm_runtime_check_session(struct musb *musb)
 	} else {
 		trace_musb_state(musb, devctl, "Allow PM with no session");
 		pm_runtime_mark_last_busy(musb->controller);
-		pm_runtime_put_autosuspend(musb->controller);
+		__pm_runtime_put_autosuspend(musb->controller);
 	}
 
 	musb->session = s;
@@ -2090,7 +2090,7 @@ static void musb_irq_work(struct work_struct *data)
 	}
 
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 }
 
 static void musb_recover_from_babble(struct musb *musb)
@@ -2564,7 +2564,7 @@ musb_init_controller(struct device *dev, int nIrq, void __iomem *ctrl)
 
 	musb->is_initialized = 1;
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 
 	return 0;
 
@@ -2887,7 +2887,7 @@ static int musb_resume(struct device *dev)
 	spin_unlock_irqrestore(&musb->lock, flags);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return 0;
 }
drivers/usb/musb/musb_debugfs.c +5 -5
index 2d623284edf6..bdb7a9dbe946 100644
@@ -107,7 +107,7 @@ static int musb_regdump_show(struct seq_file *s, void *unused)
 	}
 
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 	return 0;
 }
 DEFINE_SHOW_ATTRIBUTE(musb_regdump);
@@ -120,7 +120,7 @@ static int musb_test_mode_show(struct seq_file *s, void *unused)
 	pm_runtime_get_sync(musb->controller);
 	test = musb_readb(musb->mregs, MUSB_TESTMODE);
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 
 	if (test == (MUSB_TEST_FORCE_HOST | MUSB_TEST_FORCE_FS))
 		seq_printf(s, "force host full-speed\n");
@@ -217,7 +217,7 @@ static ssize_t musb_test_mode_write(struct file *file,
 
 ret:
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 	return count;
 }
 
@@ -244,7 +244,7 @@ static int musb_softconnect_show(struct seq_file *s, void *unused)
 		connect = reg & MUSB_DEVCTL_SESSION ? 1 : 0;
 
 		pm_runtime_mark_last_busy(musb->controller);
-		pm_runtime_put_autosuspend(musb->controller);
+		__pm_runtime_put_autosuspend(musb->controller);
 		break;
 	default:
 		connect = -1;
@@ -305,7 +305,7 @@ static ssize_t musb_softconnect_write(struct file *file,
 	}
 
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 	return count;
 }
 
drivers/usb/musb/musb_dsps.c +1 -1
index 9c7a8bbc0542..3d864c316043 100644
@@ -296,7 +296,7 @@ static void otg_timer(struct timer_list *t)
 		dev_err(dev, "%s resume work: %i\n", __func__, err);
 	spin_unlock_irqrestore(&musb->lock, flags);
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 }
 
 static void dsps_musb_clear_ep_rxintr(struct musb *musb, int epnum)
drivers/usb/musb/musb_gadget.c +4 -4
index bdf13911a1e5..9aa7e7398d32 100644
@@ -1251,7 +1251,7 @@ static int musb_gadget_queue(struct usb_ep *ep, struct usb_request *req,
 unlock:
 	spin_unlock_irqrestore(&musb->lock, lockflags);
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 
 	return status;
 }
@@ -1635,7 +1635,7 @@ static void musb_gadget_work(struct work_struct *work)
 	musb_pullup(musb, musb->softconnect);
 	spin_unlock_irqrestore(&musb->lock, flags);
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 }
 
 static int musb_gadget_pullup(struct usb_gadget *gadget, int is_on)
@@ -1855,7 +1855,7 @@ static int musb_gadget_start(struct usb_gadget *g,
 		musb_platform_set_vbus(musb, 1);
 
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 
 	return 0;
 
@@ -1908,7 +1908,7 @@ static int musb_gadget_stop(struct usb_gadget *g)
 
 	/* Force check of devctl register for PM runtime */
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 
 	return 0;
 }
drivers/usb/musb/omap2430.c +1 -1
index b4a4c1df4e0d..25ef19b05af6 100644
@@ -152,7 +152,7 @@ static void omap_musb_set_mailbox(struct omap2430_glue *glue)
 		dev_dbg(musb->controller, "ID float\n");
 	}
 	pm_runtime_mark_last_busy(musb->controller);
-	pm_runtime_put_autosuspend(musb->controller);
+	__pm_runtime_put_autosuspend(musb->controller);
 	atomic_notifier_call_chain(&musb->xceiv->notifier,
 			musb->xceiv->last_event, NULL);
 }
Signature · 1 line
2.39.5
author maintainer
#67 lore raw

PATCH 46/51 w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/w1/masters/omap_hdq.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/w1/masters/omap_hdq.c +5 -5
index d1cb5190445a..b7e87a3ef62d 100644
@@ -446,7 +446,7 @@ static u8 omap_w1_triplet(void *_hdq, u8 bdir)
 	mutex_unlock(&hdq_data->hdq_mutex);
 rtn:
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 
 	return ret;
 }
@@ -467,7 +467,7 @@ static u8 omap_w1_reset_bus(void *_hdq)
 	omap_hdq_break(hdq_data);
 
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 
 	return 0;
 }
@@ -491,7 +491,7 @@ static u8 omap_w1_read_byte(void *_hdq)
 		val = -1;
 
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 
 	return val;
 }
@@ -526,7 +526,7 @@ static void omap_w1_write_byte(void *_hdq, u8 byte)
 
 out_err:
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);
 }
 
 static struct w1_bus_master omap_w1_master = {
@@ -626,7 +626,7 @@ static int omap_hdq_probe(struct platform_device *pdev)
 	omap_hdq_break(hdq_data);
 
 	pm_runtime_mark_last_busy(&pdev->dev);
-	pm_runtime_put_autosuspend(&pdev->dev);
+	__pm_runtime_put_autosuspend(&pdev->dev);
 
 	omap_w1_master.data = hdq_data;
 
Signature · 1 line
2.39.5
#68 lore raw

Re: [PATCH 46/51] w1: omap-hdq: Switch to __pm_runtime_put_autosuspend()

Quoted 15 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 drivers/w1/masters/omap_hdq.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/w1/masters/omap_hdq.c +0 -0
index d1cb5190445a..b7e87a3ef62d 100644

drivers/w1/masters/omap_hdq.c static u8 omap_w1_triplet(void *_hdq, u8 bdir) · line 449

Quoted 5 lines
drivers/w1/masters/omap_hdq.c +1 -1
@@ -446,7 +446,7 @@ static u8 omap_w1_triplet(void *_hdq, u8 bdir)
 	mutex_unlock(&hdq_data->hdq_mutex);
 rtn:
 	pm_runtime_mark_last_busy(hdq_data->dev);
-	pm_runtime_put_autosuspend(hdq_data->dev);
+	__pm_runtime_put_autosuspend(hdq_data->dev);

So just make the switch by dropping pm_runtime_mark_last_busy(). This is unnecessary churn.

Best regards,
Krzysztof

author maintainer
#69 lore raw

PATCH 48/51 ALSA: hda: Switch to __pm_runtime_put_autosuspend()

In reply to Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

---
 sound/hda/hdac_device.c         | 2 +-
 sound/pci/hda/cs35l41_hda.c     | 8 ++++----
 sound/pci/hda/cs35l56_hda.c     | 2 +-
 sound/pci/hda/hda_intel.c       | 2 +-
 sound/pci/hda/tas2781_hda_i2c.c | 6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)
sound/hda/hdac_device.c +1 -1
index 3fbb9793dcfc..0cac8e008ff9 100644
@@ -582,7 +582,7 @@ int snd_hdac_power_down(struct hdac_device *codec)
 	struct device *dev = &codec->dev;
 
 	pm_runtime_mark_last_busy(dev);
-	return pm_runtime_put_autosuspend(dev);
+	return __pm_runtime_put_autosuspend(dev);
 }
 EXPORT_SYMBOL_GPL(snd_hdac_power_down);
 
sound/pci/hda/cs35l41_hda.c +4 -4
index d68bf7591d90..50d5b1e86d8d 100644
@@ -805,7 +805,7 @@ static void cs35l41_hda_playback_hook(struct device *dev, int action)
 		 * This ensures no amps are playing back when we start putting them to sleep.
 		 */
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		break;
 	default:
 		break;
@@ -1232,7 +1232,7 @@ static void cs35l41_fw_load_work(struct work_struct *work)
 	mutex_unlock(&cs35l41->fw_mutex);
 
 	pm_runtime_mark_last_busy(cs35l41->dev);
-	pm_runtime_put_autosuspend(cs35l41->dev);
+	__pm_runtime_put_autosuspend(cs35l41->dev);
 }
 
 static int cs35l41_fw_load_ctl_put(struct snd_kcontrol *kcontrol,
@@ -1463,7 +1463,7 @@ static int cs35l41_hda_bind(struct device *dev, struct device *master, void *mas
 	unlock_system_sleep(sleep_flags);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	dev_info(cs35l41->dev,
 		 "CS35L41 Bound - SSID: %s, BST: %d, VSPK: %d, CH: %c, FW EN: %d, SPKID: %d\n",
@@ -1992,7 +1992,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
 	if (ret)
 		goto err_pm;
 
-	pm_runtime_put_autosuspend(cs35l41->dev);
+	__pm_runtime_put_autosuspend(cs35l41->dev);
 
 	ret = component_add(cs35l41->dev, &cs35l41_hda_comp_ops);
 	if (ret) {
sound/pci/hda/cs35l56_hda.c +1 -1
index e3ac0e23ae32..fe482e4367e0 100644
@@ -91,7 +91,7 @@ static void cs35l56_hda_pause(struct cs35l56_hda *cs35l56)
 			  BIT(CS35L56_ASP_TX3_EN_SHIFT) | BIT(CS35L56_ASP_TX4_EN_SHIFT));
 
 	pm_runtime_mark_last_busy(cs35l56->base.dev);
-	pm_runtime_put_autosuspend(cs35l56->base.dev);
+	__pm_runtime_put_autosuspend(cs35l56->base.dev);
 }
 
 static void cs35l56_hda_playback_hook(struct device *dev, int action)
sound/pci/hda/hda_intel.c +1 -1
index b4540c5cd2a6..a462b0745c16 100644
@@ -2351,7 +2351,7 @@ static int azx_probe_continue(struct azx *chip)
 	if (azx_has_pm_runtime(chip)) {
 		pm_runtime_use_autosuspend(&pci->dev);
 		pm_runtime_allow(&pci->dev);
-		pm_runtime_put_autosuspend(&pci->dev);
+		__pm_runtime_put_autosuspend(&pci->dev);
 	}
 
 out_free:
sound/pci/hda/tas2781_hda_i2c.c +3 -3
index 370d847517f9..7e89b27643c7 100644
@@ -160,7 +160,7 @@ static void tas2781_hda_playback_hook(struct device *dev, int action)
 		mutex_unlock(&tas_hda->priv->codec_lock);
 
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		break;
 	default:
 		break;
@@ -698,7 +698,7 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
 	if (fmw)
 		release_firmware(fmw);
 	pm_runtime_mark_last_busy(tas_hda->dev);
-	pm_runtime_put_autosuspend(tas_hda->dev);
+	__pm_runtime_put_autosuspend(tas_hda->dev);
 }
 
 static int tas2781_hda_bind(struct device *dev, struct device *master,
@@ -741,7 +741,7 @@ static int tas2781_hda_bind(struct device *dev, struct device *master,
 		comp->playback_hook = tas2781_hda_playback_hook;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
Signature · 1 line
2.39.5
#70 lore raw

Re: [PATCH 48/51] ALSA: hda: Switch to __pm_runtime_put_autosuspend()

Quoted 5 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

Many of those calls are with pm_runtime_mark_last_busy(). (Actually the only one without it can be an oversight, it's better to be with *_mark_last_busy(), too).

Wouldn't it be better to keep without converting and rather drop the superfluous *_mark_last_busy()?

thanks,

Takashi

Quoted 123 lines
---
 sound/hda/hdac_device.c         | 2 +-
 sound/pci/hda/cs35l41_hda.c     | 8 ++++----
 sound/pci/hda/cs35l56_hda.c     | 2 +-
 sound/pci/hda/hda_intel.c       | 2 +-
 sound/pci/hda/tas2781_hda_i2c.c | 6 +++---
 5 files changed, 10 insertions(+), 10 deletions(-)
sound/hda/hdac_device.c +1 -1
index 3fbb9793dcfc..0cac8e008ff9 100644
@@ -582,7 +582,7 @@ int snd_hdac_power_down(struct hdac_device *codec)
 	struct device *dev = &codec->dev;
 
 	pm_runtime_mark_last_busy(dev);
-	return pm_runtime_put_autosuspend(dev);
+	return __pm_runtime_put_autosuspend(dev);
 }
 EXPORT_SYMBOL_GPL(snd_hdac_power_down);
 
sound/pci/hda/cs35l41_hda.c +4 -4
index d68bf7591d90..50d5b1e86d8d 100644
@@ -805,7 +805,7 @@ static void cs35l41_hda_playback_hook(struct device *dev, int action)
 		 * This ensures no amps are playing back when we start putting them to sleep.
 		 */
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		break;
 	default:
 		break;
@@ -1232,7 +1232,7 @@ static void cs35l41_fw_load_work(struct work_struct *work)
 	mutex_unlock(&cs35l41->fw_mutex);
 
 	pm_runtime_mark_last_busy(cs35l41->dev);
-	pm_runtime_put_autosuspend(cs35l41->dev);
+	__pm_runtime_put_autosuspend(cs35l41->dev);
 }
 
 static int cs35l41_fw_load_ctl_put(struct snd_kcontrol *kcontrol,
@@ -1463,7 +1463,7 @@ static int cs35l41_hda_bind(struct device *dev, struct device *master, void *mas
 	unlock_system_sleep(sleep_flags);
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	dev_info(cs35l41->dev,
 		 "CS35L41 Bound - SSID: %s, BST: %d, VSPK: %d, CH: %c, FW EN: %d, SPKID: %d\n",
@@ -1992,7 +1992,7 @@ int cs35l41_hda_probe(struct device *dev, const char *device_name, int id, int i
 	if (ret)
 		goto err_pm;
 
-	pm_runtime_put_autosuspend(cs35l41->dev);
+	__pm_runtime_put_autosuspend(cs35l41->dev);
 
 	ret = component_add(cs35l41->dev, &cs35l41_hda_comp_ops);
 	if (ret) {
sound/pci/hda/cs35l56_hda.c +1 -1
index e3ac0e23ae32..fe482e4367e0 100644
@@ -91,7 +91,7 @@ static void cs35l56_hda_pause(struct cs35l56_hda *cs35l56)
 			  BIT(CS35L56_ASP_TX3_EN_SHIFT) | BIT(CS35L56_ASP_TX4_EN_SHIFT));
 
 	pm_runtime_mark_last_busy(cs35l56->base.dev);
-	pm_runtime_put_autosuspend(cs35l56->base.dev);
+	__pm_runtime_put_autosuspend(cs35l56->base.dev);
 }
 
 static void cs35l56_hda_playback_hook(struct device *dev, int action)
sound/pci/hda/hda_intel.c +1 -1
index b4540c5cd2a6..a462b0745c16 100644
@@ -2351,7 +2351,7 @@ static int azx_probe_continue(struct azx *chip)
 	if (azx_has_pm_runtime(chip)) {
 		pm_runtime_use_autosuspend(&pci->dev);
 		pm_runtime_allow(&pci->dev);
-		pm_runtime_put_autosuspend(&pci->dev);
+		__pm_runtime_put_autosuspend(&pci->dev);
 	}
 
 out_free:
sound/pci/hda/tas2781_hda_i2c.c +3 -3
index 370d847517f9..7e89b27643c7 100644
@@ -160,7 +160,7 @@ static void tas2781_hda_playback_hook(struct device *dev, int action)
 		mutex_unlock(&tas_hda->priv->codec_lock);
 
 		pm_runtime_mark_last_busy(dev);
-		pm_runtime_put_autosuspend(dev);
+		__pm_runtime_put_autosuspend(dev);
 		break;
 	default:
 		break;
@@ -698,7 +698,7 @@ static void tasdev_fw_ready(const struct firmware *fmw, void *context)
 	if (fmw)
 		release_firmware(fmw);
 	pm_runtime_mark_last_busy(tas_hda->dev);
-	pm_runtime_put_autosuspend(tas_hda->dev);
+	__pm_runtime_put_autosuspend(tas_hda->dev);
 }
 
 static int tas2781_hda_bind(struct device *dev, struct device *master,
@@ -741,7 +741,7 @@ static int tas2781_hda_bind(struct device *dev, struct device *master,
 		comp->playback_hook = tas2781_hda_playback_hook;
 
 	pm_runtime_mark_last_busy(dev);
-	pm_runtime_put_autosuspend(dev);
+	__pm_runtime_put_autosuspend(dev);
 
 	return ret;
 }
Signature · 1 line
2.39.5
maintainer
#71 lore raw

Re: [PATCH 48/51] ALSA: hda: Switch to __pm_runtime_put_autosuspend()

Quoted 7 lines · Takashi Iwai
Quoted 4 lines · Sakari Ailus

pm_runtime_put_autosuspend() will soon be changed to include a call to pm_runtime_mark_last_busy(). This patch switches the current users to __pm_runtime_put_autosuspend() which will continue to have the functionality of old pm_runtime_put_autosuspend().

Quoted 6 lines

Many of those calls are with pm_runtime_mark_last_busy(). (Actually the only one without it can be an oversight, it's better to be with *_mark_last_busy(), too).

Wouldn't it be better to keep without converting and rather drop the superfluous *_mark_last_busy()?

Indeed, the same is true for the majority of cases in other patches. These changes seem counterproductive.