diff options
author | Jani Nikula <jani.nikula@intel.com> | 2015-08-27 16:23:30 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-09-02 11:16:44 +0200 |
commit | 42a8ca4cb4a48ddbf40e8edb291425e76bcdc230 (patch) | |
tree | 069454782a294001079bd0d257c11824b57b7d51 /drivers/gpu/drm/i915/i915_drv.h | |
parent | 79e50a4f7228e5f27d2e9785fad5509d1392a0d3 (diff) | |
download | lwn-42a8ca4cb4a48ddbf40e8edb291425e76bcdc230.tar.gz lwn-42a8ca4cb4a48ddbf40e8edb291425e76bcdc230.zip |
drm/i915: add yesno utility function
Add a common function to return "yes" or "no" string based on the
argument, and drop the local versions of it.
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index d2c444971679..1d99402e4a1e 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -106,6 +106,11 @@ unlikely(__ret_warn_on); \ }) +static inline const char *yesno(bool v) +{ + return v ? "yes" : "no"; +} + enum pipe { INVALID_PIPE = -1, PIPE_A = 0, |