linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] regmap: fix compile errors in regmap-irq.c due to stride changes
@ 2012-04-11  5:37 Stephen Warren
  2012-04-11  8:24 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Warren @ 2012-04-11  5:37 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-kernel, linux-next, Stephen Warren

From: Stephen Warren <swarren@nvidia.com>

Commit f01ee60fffa4 ("regmap: implement register striding") caused the
compile errors below. Fix them.

drivers/base/regmap/regmap-irq.c: In function 'regmap_irq_sync_unlock':
drivers/base/regmap/regmap-irq.c:62:12: error: 'map' undeclared (first use in this function)
drivers/base/regmap/regmap-irq.c:62:12: note: each undeclared identifier is reported only once for each function it appears in
drivers/base/regmap/regmap-irq.c: In function 'regmap_irq_enable':
drivers/base/regmap/regmap-irq.c:77:37: error: 'map' undeclared (first use in this function)
drivers/base/regmap/regmap-irq.c: In function 'regmap_irq_disable':
drivers/base/regmap/regmap-irq.c:85:37: error: 'map' undeclared (first use in this function)

Signed-off-by: Stephen Warren <swarren@nvidia.com>
---
I apologize for the lame patches. I didn't notice that regmap-irq.c had a
separate config option that wasn't enabled.

 drivers/base/regmap/regmap-irq.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/base/regmap/regmap-irq.c b/drivers/base/regmap/regmap-irq.c
index 56b8136..fc69d29 100644
--- a/drivers/base/regmap/regmap-irq.c
+++ b/drivers/base/regmap/regmap-irq.c
@@ -50,6 +50,7 @@ static void regmap_irq_lock(struct irq_data *data)
 static void regmap_irq_sync_unlock(struct irq_data *data)
 {
 	struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
+	struct regmap *map = d->map;
 	int i, ret;
 
 	/*
@@ -59,7 +60,7 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
 	 */
 	for (i = 0; i < d->chip->num_regs; i++) {
 		ret = regmap_update_bits(d->map, d->chip->mask_base +
-						(i * map->map->reg_stride),
+						(i * map->reg_stride),
 					 d->mask_buf_def[i], d->mask_buf[i]);
 		if (ret != 0)
 			dev_err(d->map->dev, "Failed to sync masks in %x\n",
@@ -72,6 +73,7 @@ static void regmap_irq_sync_unlock(struct irq_data *data)
 static void regmap_irq_enable(struct irq_data *data)
 {
 	struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
+	struct regmap *map = d->map;
 	const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->irq);
 
 	d->mask_buf[irq_data->reg_offset / map->reg_stride] &= ~irq_data->mask;
@@ -80,6 +82,7 @@ static void regmap_irq_enable(struct irq_data *data)
 static void regmap_irq_disable(struct irq_data *data)
 {
 	struct regmap_irq_chip_data *d = irq_data_get_irq_chip_data(data);
+	struct regmap *map = d->map;
 	const struct regmap_irq *irq_data = irq_to_regmap_irq(d, data->irq);
 
 	d->mask_buf[irq_data->reg_offset / map->reg_stride] |= irq_data->mask;
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regmap: fix compile errors in regmap-irq.c due to stride changes
  2012-04-11  5:37 [PATCH] regmap: fix compile errors in regmap-irq.c due to stride changes Stephen Warren
@ 2012-04-11  8:24 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2012-04-11  8:24 UTC (permalink / raw)
  To: Stephen Warren; +Cc: linux-kernel, linux-next, Stephen Warren

[-- Attachment #1: Type: text/plain, Size: 243 bytes --]

On Tue, Apr 10, 2012 at 11:37:22PM -0600, Stephen Warren wrote:
> From: Stephen Warren <swarren@nvidia.com>
> 
> Commit f01ee60fffa4 ("regmap: implement register striding") caused the
> compile errors below. Fix them.

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-04-11  8:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-11  5:37 [PATCH] regmap: fix compile errors in regmap-irq.c due to stride changes Stephen Warren
2012-04-11  8:24 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).