mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 16:15:11 +00:00
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
This commit is contained in:
parent
0ad086e07d
commit
7488555821
1 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue