Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294204
b: refs/heads/master
c: 640ba24
h: refs/heads/master
v: v3
  • Loading branch information
Julia Lawall authored and Florian Tobias Schandinat committed Feb 24, 2012
1 parent 1837a40 commit b6a6ea4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 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: 8aaaaf3cbfb96a9f74c5775c71067a9290244ec7
refs/heads/master: 640ba2444fa95261f23a2b86e69aabe723332bed
15 changes: 6 additions & 9 deletions trunk/drivers/video/pxa168fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include <linux/fb.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/platform_device.h>
#include <linux/dma-mapping.h>
Expand Down Expand Up @@ -670,7 +671,8 @@ static int __devinit pxa168fb_probe(struct platform_device *pdev)
/*
* Map LCD controller registers.
*/
fbi->reg_base = ioremap_nocache(res->start, resource_size(res));
fbi->reg_base = devm_ioremap_nocache(&pdev->dev, res->start,
resource_size(res));
if (fbi->reg_base == NULL) {
ret = -ENOMEM;
goto failed_free_info;
Expand Down Expand Up @@ -739,8 +741,8 @@ static int __devinit pxa168fb_probe(struct platform_device *pdev)
/*
* Register irq handler.
*/
ret = request_irq(irq, pxa168fb_handle_irq, IRQF_SHARED,
info->fix.id, fbi);
ret = devm_request_irq(&pdev->dev, irq, pxa168fb_handle_irq,
IRQF_SHARED, info->fix.id, fbi);
if (ret < 0) {
dev_err(&pdev->dev, "unable to request IRQ\n");
ret = -ENXIO;
Expand All @@ -759,14 +761,12 @@ static int __devinit pxa168fb_probe(struct platform_device *pdev)
if (ret < 0) {
dev_err(&pdev->dev, "Failed to register pxa168-fb: %d\n", ret);
ret = -ENXIO;
goto failed_free_irq;
goto failed_free_cmap;
}

platform_set_drvdata(pdev, fbi);
return 0;

failed_free_irq:
free_irq(irq, fbi);
failed_free_cmap:
fb_dealloc_cmap(&info->cmap);
failed_free_clk:
Expand Down Expand Up @@ -808,13 +808,10 @@ static int __devexit pxa168fb_remove(struct platform_device *pdev)
fb_dealloc_cmap(&info->cmap);

irq = platform_get_irq(pdev, 0);
free_irq(irq, fbi);

dma_free_writecombine(fbi->dev, PAGE_ALIGN(info->fix.smem_len),
info->screen_base, info->fix.smem_start);

iounmap(fbi->reg_base);

clk_disable(fbi->clk);
clk_put(fbi->clk);

Expand Down

0 comments on commit b6a6ea4

Please sign in to comment.