Commit d4a56117 authored by Kefeng Wang's avatar Kefeng Wang Committed by Bartlomiej Zolnierkiewicz

video: fbdev: Use dev_get_drvdata()

Using dev_get_drvdata directly.
Signed-off-by: default avatarKefeng 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: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent 3c5a1b11
...@@ -455,7 +455,7 @@ static int nuc900fb_cpufreq_transition(struct notifier_block *nb, ...@@ -455,7 +455,7 @@ static int nuc900fb_cpufreq_transition(struct notifier_block *nb,
struct fb_info *fbinfo; struct fb_info *fbinfo;
long delta_f; long delta_f;
info = container_of(nb, struct nuc900fb_info, freq_transition); 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); delta_f = info->clk_rate - clk_get_rate(info->clk);
......
...@@ -777,7 +777,7 @@ static int s3c2410fb_cpufreq_transition(struct notifier_block *nb, ...@@ -777,7 +777,7 @@ static int s3c2410fb_cpufreq_transition(struct notifier_block *nb,
long delta_f; long delta_f;
info = container_of(nb, struct s3c2410fb_info, freq_transition); 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 */ /* work out change, <0 for speed-up */
delta_f = info->clk_rate - clk_get_rate(info->clk); delta_f = info->clk_rate - clk_get_rate(info->clk);
......
...@@ -1543,7 +1543,7 @@ static void uvesafb_ioremap(struct fb_info *info) ...@@ -1543,7 +1543,7 @@ static void uvesafb_ioremap(struct fb_info *info)
static ssize_t uvesafb_show_vbe_ver(struct device *dev, static ssize_t uvesafb_show_vbe_ver(struct device *dev,
struct device_attribute *attr, char *buf) 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; struct uvesafb_par *par = info->par;
return snprintf(buf, PAGE_SIZE, "%.4x\n", par->vbe_ib.vbe_version); 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,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, static ssize_t uvesafb_show_vbe_modes(struct device *dev,
struct device_attribute *attr, char *buf) 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; struct uvesafb_par *par = info->par;
int ret = 0, i; int ret = 0, i;
...@@ -1573,7 +1573,7 @@ static DEVICE_ATTR(vbe_modes, S_IRUGO, uvesafb_show_vbe_modes, NULL); ...@@ -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, static ssize_t uvesafb_show_vendor(struct device *dev,
struct device_attribute *attr, char *buf) 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; struct uvesafb_par *par = info->par;
if (par->vbe_ib.oem_vendor_name_ptr) if (par->vbe_ib.oem_vendor_name_ptr)
...@@ -1588,7 +1588,7 @@ static DEVICE_ATTR(oem_vendor, S_IRUGO, uvesafb_show_vendor, NULL); ...@@ -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, static ssize_t uvesafb_show_product_name(struct device *dev,
struct device_attribute *attr, char *buf) 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; struct uvesafb_par *par = info->par;
if (par->vbe_ib.oem_product_name_ptr) 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,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, static ssize_t uvesafb_show_product_rev(struct device *dev,
struct device_attribute *attr, char *buf) 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; struct uvesafb_par *par = info->par;
if (par->vbe_ib.oem_product_rev_ptr) 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,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, static ssize_t uvesafb_show_oem_string(struct device *dev,
struct device_attribute *attr, char *buf) 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; struct uvesafb_par *par = info->par;
if (par->vbe_ib.oem_string_ptr) if (par->vbe_ib.oem_string_ptr)
...@@ -1633,7 +1633,7 @@ static DEVICE_ATTR(oem_string, S_IRUGO, uvesafb_show_oem_string, NULL); ...@@ -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, static ssize_t uvesafb_show_nocrtc(struct device *dev,
struct device_attribute *attr, char *buf) 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; struct uvesafb_par *par = info->par;
return snprintf(buf, PAGE_SIZE, "%d\n", par->nocrtc); return snprintf(buf, PAGE_SIZE, "%d\n", par->nocrtc);
...@@ -1642,7 +1642,7 @@ static ssize_t uvesafb_show_nocrtc(struct device *dev, ...@@ -1642,7 +1642,7 @@ static ssize_t uvesafb_show_nocrtc(struct device *dev,
static ssize_t uvesafb_store_nocrtc(struct device *dev, static ssize_t uvesafb_store_nocrtc(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count) 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; struct uvesafb_par *par = info->par;
if (count > 0) { if (count > 0) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment