Skip to content

Commit a71d6e0

Browse files
committed
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
2 parents fbb5ba9 + f43ab90 commit a71d6e0

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

drivers/mfd/pcf50633-core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ static irqreturn_t pcf50633_irq(int irq, void *data)
443443
dev_dbg(pcf->dev, "pcf50633_irq\n");
444444

445445
get_device(pcf->dev);
446-
disable_irq(pcf->irq);
446+
disable_irq_nosync(pcf->irq);
447447
schedule_work(&pcf->irq_work);
448448

449449
return IRQ_HANDLED;

drivers/mfd/wm8350-core.c

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,6 @@ static int wm8350_phys_read(struct wm8350 *wm8350, u8 reg, int num_regs,
7979
/* Cache is CPU endian */
8080
dest[i - reg] = be16_to_cpu(dest[i - reg]);
8181

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-
8682
/* Mask out non-readable bits */
8783
dest[i - reg] &= wm8350_reg_io_map[i].readable;
8884
}
@@ -182,9 +178,6 @@ static int wm8350_write(struct wm8350 *wm8350, u8 reg, int num_regs, u16 *src)
182178
(wm8350->reg_cache[i] & ~wm8350_reg_io_map[i].writable)
183179
| src[i - reg];
184180

185-
/* Don't store volatile bits */
186-
wm8350->reg_cache[i] &= ~wm8350_reg_io_map[i].vol;
187-
188181
src[i - reg] = cpu_to_be16(src[i - reg]);
189182
}
190183

@@ -1261,7 +1254,6 @@ static int wm8350_create_cache(struct wm8350 *wm8350, int type, int mode)
12611254
(i < WM8350_CLOCK_CONTROL_1 || i > WM8350_AIF_TEST)) {
12621255
value = be16_to_cpu(wm8350->reg_cache[i]);
12631256
value &= wm8350_reg_io_map[i].readable;
1264-
value &= ~wm8350_reg_io_map[i].vol;
12651257
wm8350->reg_cache[i] = value;
12661258
} else
12671259
wm8350->reg_cache[i] = reg_map[i];

0 commit comments

Comments
 (0)