summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/gma500/framebuffer.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-02-06 10:58:18 +0100
committerDave Airlie <airlied@redhat.com>2012-02-09 11:15:25 +0100
commitd9bc3c02e36d844c2d980e65ddda5c7699e073f8 (patch)
tree95de33796245ca8c4e7629ddf22629bcc89f1403 /drivers/gpu/drm/gma500/framebuffer.c
parentdrm: add convenience function to create an enum property (diff)
downloadlinux-d9bc3c02e36d844c2d980e65ddda5c7699e073f8.tar.xz
linux-d9bc3c02e36d844c2d980e65ddda5c7699e073f8.zip
drm: add convenience function to create an range property
Creating a range property is a common pattern, so create a convenience function for this and use it where appropriate. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/gma500/framebuffer.c')
-rw-r--r--drivers/gpu/drm/gma500/framebuffer.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c
index 830dfdd6bf15..78733b5fd3fb 100644
--- a/drivers/gpu/drm/gma500/framebuffer.c
+++ b/drivers/gpu/drm/gma500/framebuffer.c
@@ -725,10 +725,7 @@ static int psb_create_backlight_property(struct drm_device *dev)
if (dev_priv->backlight_property)
return 0;
- backlight = drm_property_create(dev, DRM_MODE_PROP_RANGE,
- "backlight", 2);
- backlight->values[0] = 0;
- backlight->values[1] = 100;
+ backlight = drm_property_create_range(dev, 0, "backlight", 0, 100);
dev_priv->backlight_property = backlight;