summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorkernel test robot <lkp@intel.com>2020-08-26 22:54:05 +0200
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>2020-09-08 13:33:27 +0200
commit6bfea83eec8e266ffe0da90037c17bca5e698eb4 (patch)
tree87a3617538b09795b782cafb81cff5559928f555 /drivers/video
parentfe6c6a4af2be8c15bac77f7ea160f947c04840d1 (diff)
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: kernel test robot <lkp@intel.com> Signed-off-by: Julia 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: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> Link: https://patchwork.freedesktop.org/patch/msgid/alpine.DEB.2.22.394.2008262252270.2522@hadrien
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/udlfb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c
index 5b014b479f83..f9b3c1cb9530 100644
--- a/drivers/video/fbdev/udlfb.c
+++ b/drivers/video/fbdev/udlfb.c
@@ -1457,7 +1457,7 @@ static ssize_t edid_show(
struct file *filp,
struct kobject *kobj, struct bin_attribute *a,
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 dlfb_data *dlfb = fb_info->par;
@@ -1479,7 +1479,7 @@ static ssize_t edid_store(
struct file *filp,
struct kobject *kobj, struct bin_attribute *a,
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 dlfb_data *dlfb = fb_info->par;
int ret;