Skip to content

Commit 1470acb

Browse files
arndbsgruszka
authored andcommitted
accel/ivpu: avoid build failure with CONFIG_PM=n
The usage count of struct dev_pm_info is an implementation detail that is only available if CONFIG_PM is enabled, so printing it in a debug message causes a build failure in configurations without PM: In file included from include/linux/device.h:15, from include/linux/pci.h:37, from drivers/accel/ivpu/ivpu_pm.c:8: drivers/accel/ivpu/ivpu_pm.c: In function 'ivpu_rpm_get_if_active': drivers/accel/ivpu/ivpu_pm.c:254:51: error: 'struct dev_pm_info' has no member named 'usage_count' 254 | atomic_read(&vdev->drm.dev->power.usage_count)); | ^ include/linux/dev_printk.h:129:48: note: in definition of macro 'dev_printk' 129 | _dev_printk(level, dev, fmt, ##__VA_ARGS__); \ | ^~~~~~~~~~~ drivers/accel/ivpu/ivpu_drv.h:75:17: note: in expansion of macro 'dev_dbg' 75 | dev_dbg((vdev)->drm.dev, "[%s] " fmt, #type, ##args); \ | ^~~~~~~ drivers/accel/ivpu/ivpu_pm.c:253:9: note: in expansion of macro 'ivpu_dbg' 253 | ivpu_dbg(vdev, RPM, "rpm_get_if_active count %d\n", | ^~~~~~~~ The print message does not seem essential, so the easiest workaround is to just remove it. Fixes: c39dc15 ("accel/ivpu: Read clock rate only if device is up") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Stanislaw Gruszka <[email protected]> Signed-off-by: Stanislaw Gruszka <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 3db2420 commit 1470acb

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

drivers/accel/ivpu/ivpu_pm.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,6 @@ int ivpu_rpm_get_if_active(struct ivpu_device *vdev)
250250
{
251251
int ret;
252252

253-
ivpu_dbg(vdev, RPM, "rpm_get_if_active count %d\n",
254-
atomic_read(&vdev->drm.dev->power.usage_count));
255-
256253
ret = pm_runtime_get_if_active(vdev->drm.dev, false);
257254
drm_WARN_ON(&vdev->drm, ret < 0);
258255

0 commit comments

Comments
 (0)