[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20091116060843.20162.17883.stgit@localhost.localdomain>
Date: Sun, 15 Nov 2009 22:08:43 -0800
From: Dmitry Torokhov <dmitry.torokhov@...il.com>
To: Samuel Ortiz <sameo@...ux.intel.com>
Cc: linux-kernel@...r.kernel.org, Lars-Peter Clausen <lars@...afoo.de>,
Balaji Rao <balajirrao@...nmoko.org>
Subject: [PATCH 1/5] mfd: pcf50633 - make 'is_suspended' a bool
The field holds boolean data and should be typed as such. Also annotate
check for is_spspended in IRQ handler with 'unlikely'.
Signed-off-by: Dmitry Torokhov <dtor@...l.ru>
---
drivers/mfd/pcf50633-core.c | 6 +++---
include/linux/mfd/pcf50633/core.h | 3 ++-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index 03dcc92..fb44e4d 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -412,8 +412,8 @@ static void pcf50633_irq_worker(struct work_struct *work)
}
/* Have we just resumed ? */
- if (pcf->is_suspended) {
- pcf->is_suspended = 0;
+ if (unlikely(pcf->is_suspended)) {
+ pcf->is_suspended = false;
/* Set the resume reason filtering out non resumers */
for (i = 0; i < ARRAY_SIZE(pcf_int); i++)
@@ -510,7 +510,7 @@ static int pcf50633_suspend(struct i2c_client *client, pm_message_t state)
goto out;
}
- pcf->is_suspended = 1;
+ pcf->is_suspended = true;
out:
return ret;
diff --git a/include/linux/mfd/pcf50633/core.h b/include/linux/mfd/pcf50633/core.h
index d9034cc..43bb2ac 100644
--- a/include/linux/mfd/pcf50633/core.h
+++ b/include/linux/mfd/pcf50633/core.h
@@ -13,6 +13,7 @@
#ifndef __LINUX_MFD_PCF50633_CORE_H
#define __LINUX_MFD_PCF50633_CORE_H
+#include <linux/types.h>
#include <linux/i2c.h>
#include <linux/workqueue.h>
#include <linux/regulator/driver.h>
@@ -139,7 +140,7 @@ struct pcf50633 {
u8 suspend_irq_masks[5];
u8 resume_reason[5];
- int is_suspended;
+ bool is_suspended;
int onkey1s_held;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists