[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <3fea991541fbfc4ffece2c174adeb02cb9436c90.1452696179.git.geliangtang@163.com>
Date: Wed, 13 Jan 2016 22:48:41 +0800
From: Geliang Tang <geliangtang@....com>
To: David Airlie <airlied@...ux.ie>
Cc: Geliang Tang <geliangtang@....com>,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: [PATCH 3/5] drm/sysfs: use kobj_to_dev()
Use kobj_to_dev() instead of open-coding it.
Signed-off-by: Geliang Tang <geliangtang@....com>
---
drivers/gpu/drm/drm_sysfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 0ca6410..d503f8e 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;
--
2.5.0
Powered by blists - more mailing lists