aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-05-19 21:44:09 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-05-19 21:44:09 -0400
commita71d6e0d6fe098cda4e5de1ceb202b64f963f60c (patch)
tree5ad22381920f04cda98ff563c04adebb2ecdd345 /drivers
parentfbb5ba92766a0a7803635f053220c325d26def9c (diff)
parentf43ab901005c2bb3c5440e91b6efae9f5db02e7c (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: mfd: pcf50633: fix unsafe disable_irq() mfd: Keep a cache of WM8350 volatile values
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mfd/pcf50633-core.c2
-rw-r--r--drivers/mfd/wm8350-core.c8
2 files changed, 1 insertions, 9 deletions
diff --git a/drivers/mfd/pcf50633-core.c b/drivers/mfd/pcf50633-core.c
index 7793932a513b..11a6248cc1c1 100644
--- a/drivers/mfd/pcf50633-core.c
+++ b/drivers/mfd/pcf50633-core.c
@@ -443,7 +443,7 @@ static irqreturn_t pcf50633_irq(int irq, void *data)
443 dev_dbg(pcf->dev, "pcf50633_irq\n"); 443 dev_dbg(pcf->dev, "pcf50633_irq\n");
444 444
445 get_device(pcf->dev); 445 get_device(pcf->dev);
446 disable_irq(pcf->irq); 446 disable_irq_nosync(pcf->irq);
447 schedule_work(&pcf->irq_work); 447 schedule_work(&pcf->irq_work);
448 448
449 return IRQ_HANDLED; 449 return IRQ_HANDLED;
diff --git a/drivers/mfd/wm8350-core.c b/drivers/mfd/wm8350-core.c
index c2be3088e2e1..fe24079387c5 100644
--- a/drivers/mfd/wm8350-core.c
+++ b/drivers/mfd/wm8350-core.c
@@ -79,10 +79,6 @@ static int wm8350_phys_read(struct wm8350 *wm8350, u8 reg, int num_regs,
79 /* Cache is CPU endian */ 79 /* Cache is CPU endian */
80 dest[i - reg] = be16_to_cpu(dest[i - reg]); 80 dest[i - reg] = be16_to_cpu(dest[i - reg]);
81 81
82 /* Satisfy non-volatile bits from cache */
83 dest[i - reg] &= wm8350_reg_io_map[i].vol;
84 dest[i - reg] |= wm8350->reg_cache[i];
85
86 /* Mask out non-readable bits */ 82 /* Mask out non-readable bits */
87 dest[i - reg] &= wm8350_reg_io_map[i].readable; 83 dest[i - reg] &= wm8350_reg_io_map[i].readable;
88 } 84 }
@@ -182,9 +178,6 @@ static int wm8350_write(struct wm8350 *wm8350, u8 reg, int num_regs, u16 *src)
182 (wm8350->reg_cache[i] & ~wm8350_reg_io_map[i].writable) 178 (wm8350->reg_cache[i] & ~wm8350_reg_io_map[i].writable)
183 | src[i - reg]; 179 | src[i - reg];
184 180
185 /* Don't store volatile bits */
186 wm8350->reg_cache[i] &= ~wm8350_reg_io_map[i].vol;
187
188 src[i - reg] = cpu_to_be16(src[i - reg]); 181 src[i - reg] = cpu_to_be16(src[i - reg]);
189 } 182 }
190 183
@@ -1261,7 +1254,6 @@ static int wm8350_create_cache(struct wm8350 *wm8350, int type, int mode)
1261 (i < WM8350_CLOCK_CONTROL_1 || i > WM8350_AIF_TEST)) { 1254 (i < WM8350_CLOCK_CONTROL_1 || i > WM8350_AIF_TEST)) {
1262 value = be16_to_cpu(wm8350->reg_cache[i]); 1255 value = be16_to_cpu(wm8350->reg_cache[i]);
1263 value &= wm8350_reg_io_map[i].readable; 1256 value &= wm8350_reg_io_map[i].readable;
1264 value &= ~wm8350_reg_io_map[i].vol;
1265 wm8350->reg_cache[i] = value; 1257 wm8350->reg_cache[i] = value;
1266 } else 1258 } else
1267 wm8350->reg_cache[i] = reg_map[i]; 1259 wm8350->reg_cache[i] = reg_map[i];