mirror of
https://github.com/torvalds/linux.git
synced 2024-11-18 10:01:43 +00:00
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: Wolfram Sang <wsa+renesas@sang-engineering.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
This commit is contained in:
parent
b2faabc830
commit
6677b275f3
@ -387,8 +387,7 @@ static void dsicm_get_resolution(struct omap_dss_device *dssdev,
|
||||
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 *in = ddata->in;
|
||||
u8 errors = 0;
|
||||
int r;
|
||||
@ -419,8 +418,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 *in = ddata->in;
|
||||
u8 id1, id2, id3;
|
||||
int r;
|
||||
@ -451,8 +449,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 *in = ddata->in;
|
||||
unsigned long t;
|
||||
int r;
|
||||
@ -486,8 +483,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 t;
|
||||
|
||||
mutex_lock(&ddata->lock);
|
||||
@ -501,8 +497,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 *in = ddata->in;
|
||||
unsigned long t;
|
||||
int r;
|
||||
@ -533,8 +528,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 t;
|
||||
|
||||
mutex_lock(&ddata->lock);
|
||||
|
Loading…
Reference in New Issue
Block a user