Corrected the patch.
diff --git a/arch/sh/boards/hp6xx/hp6xx_apm.c b/arch/sh/boards/hp6xx/hp6xx_apm.c
index d1c1460..4329058 100644
--- a/arch/sh/boards/hp6xx/hp6xx_apm.c
+++ b/arch/sh/boards/hp6xx/hp6xx_apm.c
@@ -20,9 +20,9 @@
#define APM_CRITICAL 10
#define APM_LOW 30
-#define HP680_BATTERY_MAX 875
-#define HP680_BATTERY_MIN 600
-#define HP680_BATTERY_AC_ON 900
+#define HP680_BATTERY_MAX 898
+#define HP680_BATTERY_MIN 486
+#define HP680_BATTERY_AC_ON 1023
#define MODNAME "hp6x0_apm"
@@ -65,9 +65,10 @@ static void hp6x0_apm_get_power_status(struct apm_power_info *info)
static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev)
{
- if (!apm_suspended)
+ if(!APM_DISABLED)
apm_queue_event(APM_USER_SUSPEND);
-
+ /* apm_suspended (SH) -> apm_disabled (ARM)
+ and it is now handled by the driver itself */
return IRQ_HANDLED;
}
@@ -76,10 +77,10 @@ static int __init hp6x0_apm_init(void)
int ret;
ret = request_irq(HP680_BTN_IRQ, hp6x0_apm_interrupt,
- IRQF_DISABLED, MODNAME, NULL);
+ IRQF_DISABLED, MODNAME, NULL);
if (unlikely(ret < 0)) {
printk(KERN_ERR MODNAME ": IRQ %d request failed\n",
- HP680_BTN_IRQ);
+ HP680_BTN_IRQ);
return ret;
}
@@ -91,7 +92,6 @@ static int __init hp6x0_apm_init(void)
static void __exit hp6x0_apm_exit(void)
{
free_irq(HP680_BTN_IRQ, 0);
- apm_get_info = NULL;
}
module_init(hp6x0_apm_init);
On Fri, 24 Aug 2007 17:37:35 +0900
Paul Mundt <le...@li...> wrote:
> On Thu, Aug 23, 2007 at 02:35:36PM -0700, Kristoffer Ericson wrote:
> > + if(!APM_DISABLED)
> > + apm_queue_event(APM_USER_SUSPEND);
> > + /* apm_suspended (SH) -> apm_disabled (ARM)
> > + and it is now handled by the driver itself */
> > return IRQ_HANDLED;
> > }
> >
> This is totally whitespace damaged. Please run your patches through
> scripts/checkpatch.pl.
--
Kristoffer Ericson <Kri...@Gm...>
|