video: fbdev: aty: Use dev_get_drvdata
Subsystems (2)
PATCH 1/1 video: fbdev: aty: Use dev_get_drvdata
Instead of using to_pci_dev + pci_get_drvdata,
use dev_get_drvdata to make code simpler.
Signed-off-by Chuhong Yuan <[email protected]>
--- drivers/video/fbdev/aty/radeon_base.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
drivers/video/fbdev/aty/radeon_base.c +2 -4
@@ -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);
Signature · 1 line
2.20.1
Quoted 4 lines · Chuhong Yuan
Instead of using
to_pci_dev+pci_get_drvdata,
usedev_get_drvdatato make code simpler.Signed-off-by Chuhong Yuan <[email protected]>
Patch queued for v5.4, thanks.
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics