summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_sysfs.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-10-16 03:10:32 +0300
committerDave Airlie <airlied@redhat.com>2015-10-16 03:25:28 +0300
commit48f87dd146a480c723774962eca675873a8aa1da (patch)
tree71461989ebe8a20258ca4b0be341b755594a2b0b /drivers/gpu/drm/drm_sysfs.c
parent6b62b3e134676687d5d666e6edc3b45f1507b2b7 (diff)
parent06d1ee32a4d25356a710b49d5e95dbdd68bdf505 (diff)
downloadlinux-48f87dd146a480c723774962eca675873a8aa1da.tar.xz
Merge commit '06d1ee32a4d25356a710b49d5e95dbdd68bdf505' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
Backmerge the drm-fixes pull from Linus's tree into drm-next. This is to fix some conflicts and make future pulls cleaner
Diffstat (limited to 'drivers/gpu/drm/drm_sysfs.c')
-rw-r--r--drivers/gpu/drm/drm_sysfs.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index f08873f6489c..615b7e667320 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -230,18 +230,12 @@ static ssize_t dpms_show(struct device *device,
char *buf)
{
struct drm_connector *connector = to_drm_connector(device);
- struct drm_device *dev = connector->dev;
- uint64_t dpms_status;
- int ret;
+ int dpms;
- ret = drm_object_property_get_value(&connector->base,
- dev->mode_config.dpms_property,
- &dpms_status);
- if (ret)
- return 0;
+ dpms = READ_ONCE(connector->dpms);
return snprintf(buf, PAGE_SIZE, "%s\n",
- drm_get_dpms_name((int)dpms_status));
+ drm_get_dpms_name(dpms));
}
static ssize_t enabled_show(struct device *device,