video: fbdev: Use dev_get_drvdata()
authorKefeng Wang <wangkefeng.wang@huawei.com>
Mon, 6 May 2019 13:57:47 +0000 (15:57 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Mon, 6 May 2019 13:57:47 +0000 (15:57 +0200)
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>
drivers/video/fbdev/nuc900fb.c
drivers/video/fbdev/s3c2410fb.c
drivers/video/fbdev/uvesafb.c

index 6680edae4696d1b0dc4dff547dda27ca8c159ab5..44ea5380a546e514aa64026d406094ae44283300 100644 (file)
@@ -455,7 +455,7 @@ static int nuc900fb_cpufreq_transition(struct notifier_block *nb,
        struct fb_info *fbinfo;
        long delta_f;
        info = container_of(nb, struct nuc900fb_info, freq_transition);
-       fbinfo = platform_get_drvdata(to_platform_device(info->dev));
+       fbinfo = dev_get_drvdata(info->dev);
 
        delta_f = info->clk_rate - clk_get_rate(info->clk);
 
index a67e4567e65619632fc8479b8feb9133bf801239..a702da89910bdafae20d3086be36704909302897 100644 (file)
@@ -777,7 +777,7 @@ static int s3c2410fb_cpufreq_transition(struct notifier_block *nb,
        long delta_f;
 
        info = container_of(nb, struct s3c2410fb_info, freq_transition);
-       fbinfo = platform_get_drvdata(to_platform_device(info->dev));
+       fbinfo = dev_get_drvdata(info->dev);
 
        /* work out change, <0 for speed-up */
        delta_f = info->clk_rate - clk_get_rate(info->clk);
index 34dc8e53a1e9db4266e0f1aacb22a0b48fd027bc..d707fdb97354e44547e9bc95ee501ee2b059e263 100644 (file)
@@ -1543,7 +1543,7 @@ static void uvesafb_ioremap(struct fb_info *info)
 static ssize_t uvesafb_show_vbe_ver(struct device *dev,
                struct device_attribute *attr, char *buf)
 {
-       struct fb_info *info = platform_get_drvdata(to_platform_device(dev));
+       struct fb_info *info = dev_get_drvdata(dev);
        struct uvesafb_par *par = info->par;
 
        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);
 static ssize_t uvesafb_show_vbe_modes(struct device *dev,
                struct device_attribute *attr, char *buf)
 {
-       struct fb_info *info = platform_get_drvdata(to_platform_device(dev));
+       struct fb_info *info = dev_get_drvdata(dev);
        struct uvesafb_par *par = info->par;
        int ret = 0, i;
 
@@ -1573,7 +1573,7 @@ static DEVICE_ATTR(vbe_modes, S_IRUGO, uvesafb_show_vbe_modes, NULL);
 static ssize_t uvesafb_show_vendor(struct device *dev,
                struct device_attribute *attr, char *buf)
 {
-       struct fb_info *info = platform_get_drvdata(to_platform_device(dev));
+       struct fb_info *info = dev_get_drvdata(dev);
        struct uvesafb_par *par = info->par;
 
        if (par->vbe_ib.oem_vendor_name_ptr)
@@ -1588,7 +1588,7 @@ static DEVICE_ATTR(oem_vendor, S_IRUGO, uvesafb_show_vendor, NULL);
 static ssize_t uvesafb_show_product_name(struct device *dev,
                struct device_attribute *attr, char *buf)
 {
-       struct fb_info *info = platform_get_drvdata(to_platform_device(dev));
+       struct fb_info *info = dev_get_drvdata(dev);
        struct uvesafb_par *par = info->par;
 
        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);
 static ssize_t uvesafb_show_product_rev(struct device *dev,
                struct device_attribute *attr, char *buf)
 {
-       struct fb_info *info = platform_get_drvdata(to_platform_device(dev));
+       struct fb_info *info = dev_get_drvdata(dev);
        struct uvesafb_par *par = info->par;
 
        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);
 static ssize_t uvesafb_show_oem_string(struct device *dev,
                struct device_attribute *attr, char *buf)
 {
-       struct fb_info *info = platform_get_drvdata(to_platform_device(dev));
+       struct fb_info *info = dev_get_drvdata(dev);
        struct uvesafb_par *par = info->par;
 
        if (par->vbe_ib.oem_string_ptr)
@@ -1633,7 +1633,7 @@ static DEVICE_ATTR(oem_string, S_IRUGO, uvesafb_show_oem_string, NULL);
 static ssize_t uvesafb_show_nocrtc(struct device *dev,
                struct device_attribute *attr, char *buf)
 {
-       struct fb_info *info = platform_get_drvdata(to_platform_device(dev));
+       struct fb_info *info = dev_get_drvdata(dev);
        struct uvesafb_par *par = info->par;
 
        return snprintf(buf, PAGE_SIZE, "%d\n", par->nocrtc);
@@ -1642,7 +1642,7 @@ static ssize_t uvesafb_show_nocrtc(struct device *dev,
 static ssize_t uvesafb_store_nocrtc(struct device *dev,
                struct device_attribute *attr, const char *buf, size_t count)
 {
-       struct fb_info *info = platform_get_drvdata(to_platform_device(dev));
+       struct fb_info *info = dev_get_drvdata(dev);
        struct uvesafb_par *par = info->par;
 
        if (count > 0) {