diff options
author | Wang Qing <wangqing@vivo.com> | 2020-09-22 20:14:24 +0800 |
---|---|---|
committer | Sam Ravnborg <sam@ravnborg.org> | 2020-10-16 22:59:00 +0200 |
commit | 748855582101b6c3a2ae3debb2ce2d4555c6c677 (patch) | |
tree | 0406a9888f2974411ce055fa9aaf15b494862b9f /drivers/video | |
parent | 0ad086e07dd553b4b56eb68f0d228d46e7543eca (diff) |
video: use kobj_to_dev()
Use kobj_to_dev() instead of container_of()
Signed-off-by: Wang Qing <wangqing@vivo.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1600776867-24226-1-git-send-email-wangqing@vivo.com
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/aty/radeon_base.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index 2fe690150420..6851f47613e1 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -2200,7 +2200,7 @@ static ssize_t radeon_show_edid1(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct fb_info *info = dev_get_drvdata(dev); struct radeonfb_info *rinfo = info->par; @@ -2212,7 +2212,7 @@ static ssize_t radeon_show_edid2(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct fb_info *info = dev_get_drvdata(dev); struct radeonfb_info *rinfo = info->par; |