[PATCH v2 2/2] drm/vc4: use CONFIG_PM_SLEEP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



If CONFIG_PM_SLEEP is not defined then the functions are defined as
NULL. And as a result we are getting build failure with
alpha allmodconfig with the error:

drivers/gpu/drm/vc4/vc4_v3d.c: In function 'vc4_v3d_set_power':
include/linux/stddef.h:7:14: error: called object is not a function or function pointer
 #define NULL ((void *)0)
              ^
include/linux/pm.h:776:30: note: in expansion of macro 'NULL'
 #define pm_generic_poweroff  NULL
                              ^
drivers/gpu/drm/vc4/vc4_v3d.c:157:10: note: in expansion of macro 'pm_generic_poweroff'
   return pm_generic_poweroff(&vc4->v3d->pdev->dev);
          ^
include/linux/stddef.h:7:14: error: called object is not a function or function pointer
 #define NULL ((void *)0)
              ^
include/linux/pm.h:764:28: note: in expansion of macro 'NULL'
 #define pm_generic_resume  NULL
                            ^
drivers/gpu/drm/vc4/vc4_v3d.c:159:10: note: in expansion of macro 'pm_generic_resume'
   return pm_generic_resume(&vc4->v3d->pdev->dev);
          ^

Fixes: d5b1a78a772f ("drm/vc4: Add support for drawing 3D frames.")
Cc: Eric Anholt <eric@xxxxxxxxxx>
Signed-off-by: Sudip Mukherjee <sudip@xxxxxxxxxxxxxxx>
---

Previous patch discussion at https://lkml.org/lkml/2015/12/16/159

build log of next-20151216 at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/97149763

build log of next-20151217 at:
https://travis-ci.org/sudipm-mukherjee/parport/jobs/97388456

 drivers/gpu/drm/vc4/vc4_v3d.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/vc4/vc4_v3d.c b/drivers/gpu/drm/vc4/vc4_v3d.c
index fc81412..9bc62b4 100644
--- a/drivers/gpu/drm/vc4/vc4_v3d.c
+++ b/drivers/gpu/drm/vc4/vc4_v3d.c
@@ -153,10 +153,12 @@ int vc4_v3d_debugfs_ident(struct seq_file *m, void *unused)
 void
 vc4_v3d_set_power(struct vc4_dev *vc4, bool on)
 {
+#ifdef CONFIG_PM_SLEEP
 	if (on)
 		pm_generic_poweroff(&vc4->v3d->pdev->dev);
 	else
 		pm_generic_resume(&vc4->v3d->pdev->dev);
+#endif
 }
 
 static void vc4_v3d_init_hw(struct drm_device *dev)
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux