summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/drm_sysfs.c
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@163.com>2016-01-13 17:48:41 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-01-13 18:43:07 +0300
commitd122cbf1a310d962cef45c2f161b8dc3ec1475a3 (patch)
treebdfc704495cb7c659407f2c795b081e37b2841d1 /drivers/gpu/drm/drm_sysfs.c
parentf5949141a21ee16edf1beaf95cbae7e419171ab5 (diff)
downloadlinux-d122cbf1a310d962cef45c2f161b8dc3ec1475a3.tar.xz
drm/sysfs: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it. Link: http://patchwork.freedesktop.org/patch/msgid/3fea991541fbfc4ffece2c174adeb02cb9436c90.1452696179.git.geliangtang@163.com Signed-off-by: Geliang Tang <geliangtang@163.com>
Diffstat (limited to 'drivers/gpu/drm/drm_sysfs.c')
-rw-r--r--drivers/gpu/drm/drm_sysfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 0ca64106a97b..d503f8e8c2d1 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -240,7 +240,7 @@ static ssize_t edid_show(struct file *filp, struct kobject *kobj,
struct bin_attribute *attr, char *buf, loff_t off,
size_t count)
{
- struct device *connector_dev = container_of(kobj, struct device, kobj);
+ struct device *connector_dev = kobj_to_dev(kobj);
struct drm_connector *connector = to_drm_connector(connector_dev);
unsigned char *edid;
size_t size;