Commit 13619ce5 authored by Alan Cox's avatar Alan Cox Committed by Daniel Vetter

gma500: clean up an excessive and confusing helper

This is a left over from the great clean ups in the past. It's confusing as
it returns an int, yet has one caller that never uses it. The caller already
has all the right private variables local so the entire function can be
replaced by a simple if call.
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20160129193731.8475.47809.stgit@localhost.localdomainAcked-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent db9b6040
...@@ -672,29 +672,17 @@ static const struct drm_mode_config_funcs psb_mode_funcs = { ...@@ -672,29 +672,17 @@ static const struct drm_mode_config_funcs psb_mode_funcs = {
.output_poll_changed = psbfb_output_poll_changed, .output_poll_changed = psbfb_output_poll_changed,
}; };
static int psb_create_backlight_property(struct drm_device *dev)
{
struct drm_psb_private *dev_priv = dev->dev_private;
struct drm_property *backlight;
if (dev_priv->backlight_property)
return 0;
backlight = drm_property_create_range(dev, 0, "backlight", 0, 100);
dev_priv->backlight_property = backlight;
return 0;
}
static void psb_setup_outputs(struct drm_device *dev) static void psb_setup_outputs(struct drm_device *dev)
{ {
struct drm_psb_private *dev_priv = dev->dev_private; struct drm_psb_private *dev_priv = dev->dev_private;
struct drm_connector *connector; struct drm_connector *connector;
drm_mode_create_scaling_mode_property(dev); drm_mode_create_scaling_mode_property(dev);
psb_create_backlight_property(dev);
/* It is ok for this to fail - we just don't get backlight control */
if (!dev_priv->backlight_property)
dev_priv->backlight_property = drm_property_create_range(dev, 0,
"backlight", 0, 100);
dev_priv->ops->output_init(dev); dev_priv->ops->output_init(dev);
list_for_each_entry(connector, &dev->mode_config.connector_list, list_for_each_entry(connector, &dev->mode_config.connector_list,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment