summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_drv.h
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2016-01-14 12:53:34 +0200
committerJani Nikula <jani.nikula@intel.com>2016-01-14 15:00:12 +0200
commit87ad321287ae99a8932af1a19ac99849284a62bd (patch)
treef316621bce0c89c3e0b566dff03372e6c6a33744 /drivers/gpu/drm/i915/i915_drv.h
parent603525d72219f8aee13f2c029b91c7c1435a01a7 (diff)
downloadop-kernel-dev-87ad321287ae99a8932af1a19ac99849284a62bd.zip
op-kernel-dev-87ad321287ae99a8932af1a19ac99849284a62bd.tar.gz
drm/i915: add onoff utility function
Add a common function to return "on" or "off" string based on the argument, and drop the local versions of it. This is the onoff version of commit 42a8ca4cb4a48ddbf40e8edb291425e76bcdc230 Author: Jani Nikula <jani.nikula@intel.com> Date: Thu Aug 27 16:23:30 2015 +0300 drm/i915: add yesno utility function Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1452768814-29787-1-git-send-email-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.h')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h5
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 104bd18..eb7bb97 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -102,6 +102,11 @@ static inline const char *yesno(bool v)
return v ? "yes" : "no";
}
+static inline const char *onoff(bool v)
+{
+ return v ? "on" : "off";
+}
+
enum pipe {
INVALID_PIPE = -1,
PIPE_A = 0,
OpenPOWER on IntegriCloud