mirror of https://gitee.com/openkylin/linux.git
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: Kefeng Wang <wangkefeng.wang@huawei.com> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
This commit is contained in:
parent
9a671c2145
commit
f2f5f77a22
|
@ -410,8 +410,7 @@ static const struct backlight_ops dsicm_bl_ops = {
|
|||
static ssize_t dsicm_num_errors_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(dev);
|
||||
struct omap_dss_device *src = ddata->src;
|
||||
u8 errors = 0;
|
||||
int r;
|
||||
|
@ -442,8 +441,7 @@ static ssize_t dsicm_num_errors_show(struct device *dev,
|
|||
static ssize_t dsicm_hw_revision_show(struct device *dev,
|
||||
struct device_attribute *attr, char *buf)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(dev);
|
||||
struct omap_dss_device *src = ddata->src;
|
||||
u8 id1, id2, id3;
|
||||
int r;
|
||||
|
@ -474,8 +472,7 @@ static ssize_t dsicm_store_ulps(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(dev);
|
||||
struct omap_dss_device *src = ddata->src;
|
||||
unsigned long t;
|
||||
int r;
|
||||
|
@ -509,8 +506,7 @@ static ssize_t dsicm_show_ulps(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(dev);
|
||||
unsigned int t;
|
||||
|
||||
mutex_lock(&ddata->lock);
|
||||
|
@ -524,8 +520,7 @@ static ssize_t dsicm_store_ulps_timeout(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
const char *buf, size_t count)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(dev);
|
||||
struct omap_dss_device *src = ddata->src;
|
||||
unsigned long t;
|
||||
int r;
|
||||
|
@ -556,8 +551,7 @@ static ssize_t dsicm_show_ulps_timeout(struct device *dev,
|
|||
struct device_attribute *attr,
|
||||
char *buf)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
|
||||
struct panel_drv_data *ddata = dev_get_drvdata(dev);
|
||||
unsigned int t;
|
||||
|
||||
mutex_lock(&ddata->lock);
|
||||
|
|
Loading…
Reference in New Issue