summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nouveau_display.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 10:15:25 +0000
commitd9bc3c02e36d844c2d980e65ddda5c7699e073f8 (patch)
tree95de33796245ca8c4e7629ddf22629bcc89f1403 /drivers/gpu/drm/nouveau/nouveau_display.c
parent4a67d39190315558631d944b1cea4466ed4c86d8 (diff)
downloadlinux-d9bc3c02e36d844c2d980e65ddda5c7699e073f8.tar.gz
linux-d9bc3c02e36d844c2d980e65ddda5c7699e073f8.tar.bz2
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/nouveau/nouveau_display.c')
-rw-r--r--drivers/gpu/drm/nouveau/nouveau_display.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index cc94f3cbd5af..5565e5056ba1 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -281,16 +281,10 @@ nouveau_display_create(struct drm_device *dev)
PROP_ENUM(disp->underscan_property, gen, "underscan", underscan);
disp->underscan_hborder_property =
- drm_property_create(dev, DRM_MODE_PROP_RANGE,
- "underscan hborder", 2);
- disp->underscan_hborder_property->values[0] = 0;
- disp->underscan_hborder_property->values[1] = 128;
+ drm_property_create_range(dev, 0, "underscan hborder", 0, 128);
disp->underscan_vborder_property =
- drm_property_create(dev, DRM_MODE_PROP_RANGE,
- "underscan vborder", 2);
- disp->underscan_vborder_property->values[0] = 0;
- disp->underscan_vborder_property->values[1] = 128;
+ drm_property_create_range(dev, 0, "underscan vborder", 0, 128);
dev->mode_config.funcs = (void *)&nouveau_mode_config_funcs;
dev->mode_config.fb_base = pci_resource_start(dev->pdev, 1);