diff options
author | Sascha Hauer <s.hauer@pengutronix.de> | 2012-02-06 09:58:18 (GMT) |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-02-09 10:15:25 (GMT) |
commit | d9bc3c02e36d844c2d980e65ddda5c7699e073f8 (patch) | |
tree | 95de33796245ca8c4e7629ddf22629bcc89f1403 /drivers/gpu/drm/gma500/framebuffer.c | |
parent | 4a67d39190315558631d944b1cea4466ed4c86d8 (diff) | |
download | linux-d9bc3c02e36d844c2d980e65ddda5c7699e073f8.tar.xz |
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.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index 830dfdd6b..78733b5 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; |