* [PATCH] regmap: Constify regmap_irq_chip
@ 2012-05-31 20:03 Mark Brown
0 siblings, 0 replies; only message in thread
From: Mark Brown @ 2012-05-31 20:03 UTC (permalink / raw)
To: linux-kernel; +Cc: Mark Brown
We should never be modifying it and it lets drivers declare it const.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/base/regmap/regmap-irq.c | 6 +++---
include/linux/regmap.h | 2 +-
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 4fac4b9..c190229 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -24,7 +24,7 @@ struct regmap_irq_chip_data {
struct mutex lock;
struct regmap *map;
- struct regmap_irq_chip *chip;
+ const struct regmap_irq_chip *chip;
int irq_base;
struct irq_domain *domain;
@@ -103,7 +103,7 @@ static struct irq_chip regmap_irq_chip = {
static irqreturn_t regmap_irq_thread(int irq, void *d)
{
struct regmap_irq_chip_data *data = d;
- struct regmap_irq_chip *chip = data->chip;
+ const struct regmap_irq_chip *chip = data->chip;
struct regmap *map = data->map;
int ret, i;
bool handled = false;
@@ -195,7 +195,7 @@ static struct irq_domain_ops regmap_domain_ops = {
* register values used by the IRQ controller over suspend and resume.
*/
int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
- int irq_base, struct regmap_irq_chip *chip,
+ int irq_base, const struct regmap_irq_chip *chip,
struct regmap_irq_chip_data **data)
{
struct regmap_irq_chip_data *d;
diff --git a/include/linux/regmap.h b/include/linux/regmap.h
index 56af22e..390a5ed 100644
--- a/include/linux/regmap.h
+++ b/include/linux/regmap.h
@@ -243,7 +243,7 @@ struct regmap_irq_chip {
struct regmap_irq_chip_data;
int regmap_add_irq_chip(struct regmap *map, int irq, int irq_flags,
- int irq_base, struct regmap_irq_chip *chip,
+ int irq_base, const struct regmap_irq_chip *chip,
struct regmap_irq_chip_data **data);
void regmap_del_irq_chip(int irq, struct regmap_irq_chip_data *data);
int regmap_irq_chip_get_base(struct regmap_irq_chip_data *data);
--
1.7.10
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-05-31 20:03 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-31 20:03 [PATCH] regmap: Constify regmap_irq_chip Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®