Commit 6bfea83e authored by kernel test robot's avatar kernel test robot Committed by Bartlomiej Zolnierkiewicz

video: fbdev: udlfb: fix kobj_to_dev.cocci warnings

 Use kobj_to_dev() instead of container_of()

Generated by: scripts/coccinelle/api/kobj_to_dev.cocci

Cc: Denis Efremov <efremov@linux.com>
Signed-off-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarJulia Lawall <julia.lawall@inria.fr>
Cc: Bernie Thompson <bernie@plugable.com>
[b.zolnierkie: minor patch summary fixup]
[b.zolnierkie: removed "Fixes:" tag (not in upstream tree)]
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.22.394.2008262252270.2522@hadrien
parent fe6c6a4a
...@@ -1457,7 +1457,7 @@ static ssize_t edid_show( ...@@ -1457,7 +1457,7 @@ static ssize_t edid_show(
struct file *filp, struct file *filp,
struct kobject *kobj, struct bin_attribute *a, struct kobject *kobj, struct bin_attribute *a,
char *buf, loff_t off, size_t count) { char *buf, loff_t off, size_t count) {
struct device *fbdev = container_of(kobj, struct device, kobj); struct device *fbdev = kobj_to_dev(kobj);
struct fb_info *fb_info = dev_get_drvdata(fbdev); struct fb_info *fb_info = dev_get_drvdata(fbdev);
struct dlfb_data *dlfb = fb_info->par; struct dlfb_data *dlfb = fb_info->par;
...@@ -1479,7 +1479,7 @@ static ssize_t edid_store( ...@@ -1479,7 +1479,7 @@ static ssize_t edid_store(
struct file *filp, struct file *filp,
struct kobject *kobj, struct bin_attribute *a, struct kobject *kobj, struct bin_attribute *a,
char *src, loff_t src_off, size_t src_size) { char *src, loff_t src_off, size_t src_size) {
struct device *fbdev = container_of(kobj, struct device, kobj); struct device *fbdev = kobj_to_dev(kobj);
struct fb_info *fb_info = dev_get_drvdata(fbdev); struct fb_info *fb_info = dev_get_drvdata(fbdev);
struct dlfb_data *dlfb = fb_info->par; struct dlfb_data *dlfb = fb_info->par;
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment