diff options
| author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2019-05-06 09:57:47 -0400 |
|---|---|---|
| committer | Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> | 2019-05-06 09:57:47 -0400 |
| commit | d4a5611743a6f5d126f8cbfdbf29e12fd8d1b73f (patch) | |
| tree | c42bf5a46a90e039b74dffddb2898a14aa280ef6 | |
| parent | 3c5a1b111373e669c8220803464c3a508a87e254 (diff) | |
video: fbdev: Use dev_get_drvdata()
Using dev_get_drvdata directly.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Wan ZongShun <mcuos.com@gmail.com>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Michal Januszewski <spock@gentoo.org>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
| -rw-r--r-- | drivers/video/fbdev/nuc900fb.c | 2 | ||||
| -rw-r--r-- | drivers/video/fbdev/s3c2410fb.c | 2 | ||||
| -rw-r--r-- | drivers/video/fbdev/uvesafb.c | 16 |
3 files changed, 10 insertions, 10 deletions
diff --git a/drivers/video/fbdev/nuc900fb.c b/drivers/video/fbdev/nuc900fb.c index 6680edae4696..44ea5380a546 100644 --- a/drivers/video/fbdev/nuc900fb.c +++ b/drivers/video/fbdev/nuc900fb.c | |||
| @@ -455,7 +455,7 @@ static int nuc900fb_cpufreq_transition(struct notifier_block *nb, | |||
| 455 | struct fb_info *fbinfo; | 455 | struct fb_info *fbinfo; |
| 456 | long delta_f; | 456 | long delta_f; |
| 457 | info = container_of(nb, struct nuc900fb_info, freq_transition); | 457 | info = container_of(nb, struct nuc900fb_info, freq_transition); |
| 458 | fbinfo = platform_get_drvdata(to_platform_device(info->dev)); | 458 | fbinfo = dev_get_drvdata(info->dev); |
| 459 | 459 | ||
| 460 | delta_f = info->clk_rate - clk_get_rate(info->clk); | 460 | delta_f = info->clk_rate - clk_get_rate(info->clk); |
| 461 | 461 | ||
diff --git a/drivers/video/fbdev/s3c2410fb.c b/drivers/video/fbdev/s3c2410fb.c index a67e4567e656..a702da89910b 100644 --- a/drivers/video/fbdev/s3c2410fb.c +++ b/drivers/video/fbdev/s3c2410fb.c | |||
| @@ -777,7 +777,7 @@ static int s3c2410fb_cpufreq_transition(struct notifier_block *nb, | |||
| 777 | long delta_f; | 777 | long delta_f; |
| 778 | 778 | ||
| 779 | info = container_of(nb, struct s3c2410fb_info, freq_transition); | 779 | info = container_of(nb, struct s3c2410fb_info, freq_transition); |
| 780 | fbinfo = platform_get_drvdata(to_platform_device(info->dev)); | 780 | fbinfo = dev_get_drvdata(info->dev); |
| 781 | 781 | ||
| 782 | /* work out change, <0 for speed-up */ | 782 | /* work out change, <0 for speed-up */ |
| 783 | delta_f = info->clk_rate - clk_get_rate(info->clk); | 783 | delta_f = info->clk_rate - clk_get_rate(info->clk); |
diff --git a/drivers/video/fbdev/uvesafb.c b/drivers/video/fbdev/uvesafb.c index 34dc8e53a1e9..d707fdb97354 100644 --- a/drivers/video/fbdev/uvesafb.c +++ b/drivers/video/fbdev/uvesafb.c | |||
| @@ -1543,7 +1543,7 @@ static void uvesafb_ioremap(struct fb_info *info) | |||
| 1543 | static ssize_t uvesafb_show_vbe_ver(struct device *dev, | 1543 | static ssize_t uvesafb_show_vbe_ver(struct device *dev, |
| 1544 | struct device_attribute *attr, char *buf) | 1544 | struct device_attribute *attr, char *buf) |
| 1545 | { | 1545 | { |
| 1546 | struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); | 1546 | struct fb_info *info = dev_get_drvdata(dev); |
| 1547 | struct uvesafb_par *par = info->par; | 1547 | struct uvesafb_par *par = info->par; |
| 1548 | 1548 | ||
| 1549 | return snprintf(buf, PAGE_SIZE, "%.4x\n", par->vbe_ib.vbe_version); | 1549 | return snprintf(buf, PAGE_SIZE, "%.4x\n", par->vbe_ib.vbe_version); |
| @@ -1554,7 +1554,7 @@ static DEVICE_ATTR(vbe_version, S_IRUGO, uvesafb_show_vbe_ver, NULL); | |||
| 1554 | static ssize_t uvesafb_show_vbe_modes(struct device *dev, | 1554 | static ssize_t uvesafb_show_vbe_modes(struct device *dev, |
| 1555 | struct device_attribute *attr, char *buf) | 1555 | struct device_attribute *attr, char *buf) |
| 1556 | { | 1556 | { |
| 1557 | struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); | 1557 | struct fb_info *info = dev_get_drvdata(dev); |
| 1558 | struct uvesafb_par *par = info->par; | 1558 | struct uvesafb_par *par = info->par; |
| 1559 | int ret = 0, i; | 1559 | int ret = 0, i; |
| 1560 | 1560 | ||
| @@ -1573,7 +1573,7 @@ static DEVICE_ATTR(vbe_modes, S_IRUGO, uvesafb_show_vbe_modes, NULL); | |||
| 1573 | static ssize_t uvesafb_show_vendor(struct device *dev, | 1573 | static ssize_t uvesafb_show_vendor(struct device *dev, |
| 1574 | struct device_attribute *attr, char *buf) | 1574 | struct device_attribute *attr, char *buf) |
| 1575 | { | 1575 | { |
| 1576 | struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); | 1576 | struct fb_info *info = dev_get_drvdata(dev); |
| 1577 | struct uvesafb_par *par = info->par; | 1577 | struct uvesafb_par *par = info->par; |
| 1578 | 1578 | ||
| 1579 | if (par->vbe_ib.oem_vendor_name_ptr) | 1579 | if (par->vbe_ib.oem_vendor_name_ptr) |
| @@ -1588,7 +1588,7 @@ static DEVICE_ATTR(oem_vendor, S_IRUGO, uvesafb_show_vendor, NULL); | |||
| 1588 | static ssize_t uvesafb_show_product_name(struct device *dev, | 1588 | static ssize_t uvesafb_show_product_name(struct device *dev, |
| 1589 | struct device_attribute *attr, char *buf) | 1589 | struct device_attribute *attr, char *buf) |
| 1590 | { | 1590 | { |
| 1591 | struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); | 1591 | struct fb_info *info = dev_get_drvdata(dev); |
| 1592 | struct uvesafb_par *par = info->par; | 1592 | struct uvesafb_par *par = info->par; |
| 1593 | 1593 | ||
| 1594 | if (par->vbe_ib.oem_product_name_ptr) | 1594 | if (par->vbe_ib.oem_product_name_ptr) |
| @@ -1603,7 +1603,7 @@ static DEVICE_ATTR(oem_product_name, S_IRUGO, uvesafb_show_product_name, NULL); | |||
| 1603 | static ssize_t uvesafb_show_product_rev(struct device *dev, | 1603 | static ssize_t uvesafb_show_product_rev(struct device *dev, |
| 1604 | struct device_attribute *attr, char *buf) | 1604 | struct device_attribute *attr, char *buf) |
| 1605 | { | 1605 | { |
| 1606 | struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); | 1606 | struct fb_info *info = dev_get_drvdata(dev); |
| 1607 | struct uvesafb_par *par = info->par; | 1607 | struct uvesafb_par *par = info->par; |
| 1608 | 1608 | ||
| 1609 | if (par->vbe_ib.oem_product_rev_ptr) | 1609 | if (par->vbe_ib.oem_product_rev_ptr) |
| @@ -1618,7 +1618,7 @@ static DEVICE_ATTR(oem_product_rev, S_IRUGO, uvesafb_show_product_rev, NULL); | |||
| 1618 | static ssize_t uvesafb_show_oem_string(struct device *dev, | 1618 | static ssize_t uvesafb_show_oem_string(struct device *dev, |
| 1619 | struct device_attribute *attr, char *buf) | 1619 | struct device_attribute *attr, char *buf) |
| 1620 | { | 1620 | { |
| 1621 | struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); | 1621 | struct fb_info *info = dev_get_drvdata(dev); |
| 1622 | struct uvesafb_par *par = info->par; | 1622 | struct uvesafb_par *par = info->par; |
| 1623 | 1623 | ||
| 1624 | if (par->vbe_ib.oem_string_ptr) | 1624 | if (par->vbe_ib.oem_string_ptr) |
| @@ -1633,7 +1633,7 @@ static DEVICE_ATTR(oem_string, S_IRUGO, uvesafb_show_oem_string, NULL); | |||
| 1633 | static ssize_t uvesafb_show_nocrtc(struct device *dev, | 1633 | static ssize_t uvesafb_show_nocrtc(struct device *dev, |
| 1634 | struct device_attribute *attr, char *buf) | 1634 | struct device_attribute *attr, char *buf) |
| 1635 | { | 1635 | { |
| 1636 | struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); | 1636 | struct fb_info *info = dev_get_drvdata(dev); |
| 1637 | struct uvesafb_par *par = info->par; | 1637 | struct uvesafb_par *par = info->par; |
| 1638 | 1638 | ||
| 1639 | return snprintf(buf, PAGE_SIZE, "%d\n", par->nocrtc); | 1639 | return snprintf(buf, PAGE_SIZE, "%d\n", par->nocrtc); |
| @@ -1642,7 +1642,7 @@ static ssize_t uvesafb_show_nocrtc(struct device *dev, | |||
| 1642 | static ssize_t uvesafb_store_nocrtc(struct device *dev, | 1642 | static ssize_t uvesafb_store_nocrtc(struct device *dev, |
| 1643 | struct device_attribute *attr, const char *buf, size_t count) | 1643 | struct device_attribute *attr, const char *buf, size_t count) |
| 1644 | { | 1644 | { |
| 1645 | struct fb_info *info = platform_get_drvdata(to_platform_device(dev)); | 1645 | struct fb_info *info = dev_get_drvdata(dev); |
| 1646 | struct uvesafb_par *par = info->par; | 1646 | struct uvesafb_par *par = info->par; |
| 1647 | 1647 | ||
| 1648 | if (count > 0) { | 1648 | if (count > 0) { |
