mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-18 22:34:48 +00:00
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>
This commit is contained in:
parent
f5949141a2
commit
d122cbf1a3
@ -240,7 +240,7 @@ static ssize_t edid_show(struct file *filp, struct kobject *kobj,
|
|||||||
struct bin_attribute *attr, char *buf, loff_t off,
|
struct bin_attribute *attr, char *buf, loff_t off,
|
||||||
size_t count)
|
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);
|
struct drm_connector *connector = to_drm_connector(connector_dev);
|
||||||
unsigned char *edid;
|
unsigned char *edid;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user