Commit f2f5f77a authored by Kefeng Wang's avatar Kefeng Wang Committed by Tomi Valkeinen

drm/omap: Use dev_get_drvdata()

Using dev_get_drvdata directly.

Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org
Signed-off-by: default avatarKefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 9a671c21
...@@ -410,8 +410,7 @@ static const struct backlight_ops dsicm_bl_ops = { ...@@ -410,8 +410,7 @@ static const struct backlight_ops dsicm_bl_ops = {
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 *src = ddata->src; struct omap_dss_device *src = ddata->src;
u8 errors = 0; u8 errors = 0;
int r; int r;
...@@ -442,8 +441,7 @@ static ssize_t dsicm_num_errors_show(struct device *dev, ...@@ -442,8 +441,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 *src = ddata->src; struct omap_dss_device *src = ddata->src;
u8 id1, id2, id3; u8 id1, id2, id3;
int r; int r;
...@@ -474,8 +472,7 @@ static ssize_t dsicm_store_ulps(struct device *dev, ...@@ -474,8 +472,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 *src = ddata->src; struct omap_dss_device *src = ddata->src;
unsigned long t; unsigned long t;
int r; int r;
...@@ -509,8 +506,7 @@ static ssize_t dsicm_show_ulps(struct device *dev, ...@@ -509,8 +506,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 int t; unsigned int t;
mutex_lock(&ddata->lock); mutex_lock(&ddata->lock);
...@@ -524,8 +520,7 @@ static ssize_t dsicm_store_ulps_timeout(struct device *dev, ...@@ -524,8 +520,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 *src = ddata->src; struct omap_dss_device *src = ddata->src;
unsigned long t; unsigned long t;
int r; int r;
...@@ -556,8 +551,7 @@ static ssize_t dsicm_show_ulps_timeout(struct device *dev, ...@@ -556,8 +551,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 int t; unsigned int 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