From b21fb57908c02a9cc0a62edcffc7fba00286e6d2 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 5 Jul 2011 15:42:23 +0100 Subject: gma500: tidy up the opregion and lid code This is leaking an io mapping and also referencing stuff directly that should not be directly accessed. Sort it out Signed-off-by: Alan Cox Signed-off-by: Greg Kroah-Hartman --- drivers/staging/gma500/psb_lid.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/staging/gma500/psb_lid.c') diff --git a/drivers/staging/gma500/psb_lid.c b/drivers/staging/gma500/psb_lid.c index 21fd202..af32851 100644 --- a/drivers/staging/gma500/psb_lid.c +++ b/drivers/staging/gma500/psb_lid.c @@ -32,10 +32,10 @@ static void psb_lid_timer_func(unsigned long data) u32 *lid_state = dev_priv->lid_state; u32 pp_status; - if (*lid_state == dev_priv->lid_last_state) + if (readl(lid_state) == dev_priv->lid_last_state) goto lid_timer_schedule; - if ((*lid_state) & 0x01) { + if ((readl(lid_state)) & 0x01) { /*lid state is open*/ REG_WRITE(PP_CONTROL, REG_READ(PP_CONTROL) | POWER_TARGET_ON); do { @@ -54,7 +54,7 @@ static void psb_lid_timer_func(unsigned long data) } /* printk(KERN_INFO"%s: lid: closed\n", __FUNCTION__); */ - dev_priv->lid_last_state = *lid_state; + dev_priv->lid_last_state = readl(lid_state); lid_timer_schedule: spin_lock_irqsave(&dev_priv->lid_lock, irq_flags); -- cgit v1.1