]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
video: fbdev: radeonfb: Use dev_get_drvdata
authorChuhong Yuan <hslester96@gmail.com>
Wed, 24 Jul 2019 13:19:00 +0000 (21:19 +0800)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 19 Aug 2019 13:52:25 +0000 (15:52 +0200)
Instead of using to_pci_dev + pci_get_drvdata,
use dev_get_drvdata to make code simpler.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[b.zolnierkie: fix patch summary and intendation]
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190724131900.2039-1-hslester96@gmail.com
drivers/video/fbdev/aty/radeon_base.c

index 6f891d82eebe183a16b53f467a4b1337e4368dd5..4ca07866f2f66c10a04a2f0ab639a566c3da0010 100644 (file)
@@ -2217,8 +2217,7 @@ static ssize_t radeon_show_edid1(struct file *filp, struct kobject *kobj,
                                 char *buf, loff_t off, size_t count)
 {
        struct device *dev = container_of(kobj, struct device, kobj);
-       struct pci_dev *pdev = to_pci_dev(dev);
-        struct fb_info *info = pci_get_drvdata(pdev);
+       struct fb_info *info = dev_get_drvdata(dev);
         struct radeonfb_info *rinfo = info->par;
 
        return radeon_show_one_edid(buf, off, count, rinfo->mon1_EDID);
@@ -2230,8 +2229,7 @@ static ssize_t radeon_show_edid2(struct file *filp, struct kobject *kobj,
                                 char *buf, loff_t off, size_t count)
 {
        struct device *dev = container_of(kobj, struct device, kobj);
-       struct pci_dev *pdev = to_pci_dev(dev);
-        struct fb_info *info = pci_get_drvdata(pdev);
+       struct fb_info *info = dev_get_drvdata(dev);
         struct radeonfb_info *rinfo = info->par;
 
        return radeon_show_one_edid(buf, off, count, rinfo->mon2_EDID);