Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67561
b: refs/heads/master
c: e3cec00
h: refs/heads/master
i:
  67559: c4f6ffe
v: v3
  • Loading branch information
Grant Likely committed Oct 10, 2007
1 parent d4e0d05 commit 828b36f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 31e8d4603ecaeb02424c9669e252ab835354a36e
refs/heads/master: e3cec00366e9d60ff65c6f6f8fffdfcadea01056
22 changes: 10 additions & 12 deletions trunk/drivers/video/xilinxfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,15 +349,9 @@ xilinxfb_platform_probe(struct platform_device *pdev)
{
struct xilinxfb_platform_data *pdata;
struct resource *res;
int width_mm;
int height_mm;
int rotate;

pdata = pdev->dev.platform_data;
if (!pdata) {
dev_err(&pdev->dev, "Missing pdata structure\n");
return -ENODEV;
}
int width_mm = 0;
int height_mm = 0;
int rotate = 0;

/* Find the registers address */
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
Expand All @@ -366,9 +360,13 @@ xilinxfb_platform_probe(struct platform_device *pdev)
return -ENODEV;
}

height_mm = pdata->screen_height_mm;
width_mm = pdata->screen_width_mm;
rotate = pdata->rotate_screen ? 1 : 0;
/* If a pdata structure is provided, then extract the parameters */
pdata = pdev->dev.platform_data;
if (pdata) {
height_mm = pdata->screen_height_mm;
width_mm = pdata->screen_width_mm;
rotate = pdata->rotate_screen ? 1 : 0;
}

return xilinxfb_assign(&pdev->dev, res->start, width_mm, height_mm,
rotate);
Expand Down

0 comments on commit 828b36f

Please sign in to comment.