Commit 6677b275 authored by Wolfram Sang's avatar Wolfram Sang Committed by Bartlomiej Zolnierkiewicz

video: fbdev: omap2: omapfb: displays: simplify getting .drvdata

We should get drvdata from struct device directly. Going via
platform_device is an unneeded step back and forth.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: default avatarBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
parent b2faabc8
...@@ -387,8 +387,7 @@ static void dsicm_get_resolution(struct omap_dss_device *dssdev, ...@@ -387,8 +387,7 @@ static void dsicm_get_resolution(struct omap_dss_device *dssdev,
static ssize_t dsicm_num_errors_show(struct device *dev, static ssize_t dsicm_num_errors_show(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
struct platform_device *pdev = to_platform_device(dev); struct panel_drv_data *ddata = dev_get_drvdata(dev);
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
u8 errors = 0; u8 errors = 0;
int r; int r;
...@@ -419,8 +418,7 @@ static ssize_t dsicm_num_errors_show(struct device *dev, ...@@ -419,8 +418,7 @@ static ssize_t dsicm_num_errors_show(struct device *dev,
static ssize_t dsicm_hw_revision_show(struct device *dev, static ssize_t dsicm_hw_revision_show(struct device *dev,
struct device_attribute *attr, char *buf) struct device_attribute *attr, char *buf)
{ {
struct platform_device *pdev = to_platform_device(dev); struct panel_drv_data *ddata = dev_get_drvdata(dev);
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
u8 id1, id2, id3; u8 id1, id2, id3;
int r; int r;
...@@ -451,8 +449,7 @@ static ssize_t dsicm_store_ulps(struct device *dev, ...@@ -451,8 +449,7 @@ static ssize_t dsicm_store_ulps(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
struct platform_device *pdev = to_platform_device(dev); struct panel_drv_data *ddata = dev_get_drvdata(dev);
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
unsigned long t; unsigned long t;
int r; int r;
...@@ -486,8 +483,7 @@ static ssize_t dsicm_show_ulps(struct device *dev, ...@@ -486,8 +483,7 @@ static ssize_t dsicm_show_ulps(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
char *buf) char *buf)
{ {
struct platform_device *pdev = to_platform_device(dev); struct panel_drv_data *ddata = dev_get_drvdata(dev);
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
unsigned t; unsigned t;
mutex_lock(&ddata->lock); mutex_lock(&ddata->lock);
...@@ -501,8 +497,7 @@ static ssize_t dsicm_store_ulps_timeout(struct device *dev, ...@@ -501,8 +497,7 @@ static ssize_t dsicm_store_ulps_timeout(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
const char *buf, size_t count) const char *buf, size_t count)
{ {
struct platform_device *pdev = to_platform_device(dev); struct panel_drv_data *ddata = dev_get_drvdata(dev);
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
unsigned long t; unsigned long t;
int r; int r;
...@@ -533,8 +528,7 @@ static ssize_t dsicm_show_ulps_timeout(struct device *dev, ...@@ -533,8 +528,7 @@ static ssize_t dsicm_show_ulps_timeout(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
char *buf) char *buf)
{ {
struct platform_device *pdev = to_platform_device(dev); struct panel_drv_data *ddata = dev_get_drvdata(dev);
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
unsigned t; unsigned t;
mutex_lock(&ddata->lock); mutex_lock(&ddata->lock);
......
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