Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250998
b: refs/heads/master
c: 9b6d777
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Apr 18, 2011
1 parent 75099e3 commit d623385
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 0fd08060f1bb9d7d0d712f39257dc3574a632271
refs/heads/master: 9b6d7777118d3f2abc39591481ea5b9b5e76d6ba
11 changes: 9 additions & 2 deletions trunk/drivers/video/s3c-fb.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ struct s3c_fb_vsync {

/**
* struct s3c_fb - overall hardware state of the hardware
* @slock: The spinlock protection for this data sturcture.
* @dev: The device that we bound to, for printing, etc.
* @regs_res: The resource we claimed for the IO registers.
* @bus_clk: The clk (hclk) feeding our interface and possibly pixclk.
Expand All @@ -195,6 +196,7 @@ struct s3c_fb_vsync {
* @vsync_info: VSYNC-related information (count, queues...)
*/
struct s3c_fb {
spinlock_t slock;
struct device *dev;
struct resource *regs_res;
struct clk *bus_clk;
Expand Down Expand Up @@ -947,6 +949,8 @@ static irqreturn_t s3c_fb_irq(int irq, void *dev_id)
void __iomem *regs = sfb->regs;
u32 irq_sts_reg;

spin_lock(&sfb->slock);

irq_sts_reg = readl(regs + VIDINTCON1);

if (irq_sts_reg & VIDINTCON1_INT_FRAME) {
Expand All @@ -963,6 +967,7 @@ static irqreturn_t s3c_fb_irq(int irq, void *dev_id)
*/
s3c_fb_disable_irq(sfb);

spin_unlock(&sfb->slock);
return IRQ_HANDLED;
}

Expand Down Expand Up @@ -1339,6 +1344,8 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
sfb->pdata = pd;
sfb->variant = fbdrv->variant;

spin_lock_init(&sfb->slock);

sfb->bus_clk = clk_get(dev, "lcd");
if (IS_ERR(sfb->bus_clk)) {
dev_err(dev, "failed to get bus clock\n");
Expand Down Expand Up @@ -1549,7 +1556,7 @@ static int s3c_fb_resume(struct device *dev)
return 0;
}

int s3c_fb_runtime_suspend(struct device *dev)
static int s3c_fb_runtime_suspend(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct s3c_fb *sfb = platform_get_drvdata(pdev);
Expand All @@ -1569,7 +1576,7 @@ int s3c_fb_runtime_suspend(struct device *dev)
return 0;
}

int s3c_fb_runtime_resume(struct device *dev)
static int s3c_fb_runtime_resume(struct device *dev)
{
struct platform_device *pdev = to_platform_device(dev);
struct s3c_fb *sfb = platform_get_drvdata(pdev);
Expand Down

0 comments on commit d623385

Please sign in to comment.