alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] mfd: mc13xxx: Don't require lock for simple register I/O
@ 2013-09-18 18:06 Mark Brown
  2013-09-18 18:06 ` [PATCH 2/3] mfd: mc13xxx: Move SPI erratum workaround into SPI I/O function Mark Brown
  2013-09-18 18:06 ` [PATCH 3/3] ASoC: mc13783: Use regmap directly from ASoC Mark Brown
  0 siblings, 2 replies; 10+ messages in thread
From: Mark Brown @ 2013-09-18 18:06 UTC (permalink / raw)
  To: Lee Jones, Samuel Ortiz, Liam Girdwood, Marc Reilly,
	u.kleine-koenig
  Cc: linux-kernel, alsa-devel, linaro-kernel, Mark Brown

From: Mark Brown <broonie@linaro.org>

Since the conversion to regmap there has been no need for device level
locking for I/O as regmap provides locking so remove the locks.

Signed-off-by: Mark Brown <broonie@linaro.org>
---
 drivers/mfd/mc13xxx-core.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index 2a9b100..dbbf8ee 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -158,8 +158,6 @@ int mc13xxx_reg_read(struct mc13xxx *mc13xxx, unsigned int offset, u32 *val)
 {
 	int ret;
 
-	BUG_ON(!mutex_is_locked(&mc13xxx->lock));
-
 	if (offset > MC13XXX_NUMREGS)
 		return -EINVAL;
 
@@ -172,8 +170,6 @@ EXPORT_SYMBOL(mc13xxx_reg_read);
 
 int mc13xxx_reg_write(struct mc13xxx *mc13xxx, unsigned int offset, u32 val)
 {
-	BUG_ON(!mutex_is_locked(&mc13xxx->lock));
-
 	dev_vdbg(mc13xxx->dev, "[0x%02x] <- 0x%06x\n", offset, val);
 
 	if (offset > MC13XXX_NUMREGS || val > 0xffffff)
@@ -186,7 +182,6 @@ EXPORT_SYMBOL(mc13xxx_reg_write);
 int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset,
 		u32 mask, u32 val)
 {
-	BUG_ON(!mutex_is_locked(&mc13xxx->lock));
 	BUG_ON(val & ~mask);
 	dev_vdbg(mc13xxx->dev, "[0x%02x] <- 0x%06x (mask: 0x%06x)\n",
 			offset, val, mask);
-- 
1.8.4.rc3

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH 1/3] mfd: mc13xxx: Don't require lock for simple register I/O
@ 2013-09-23 18:14 Mark Brown
  2013-09-23 18:14 ` [PATCH 3/3] ASoC: mc13783: Use regmap directly from ASoC Mark Brown
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Brown @ 2013-09-23 18:14 UTC (permalink / raw)
  To: Lee Jones, Samuel Ortiz
  Cc: alsa-devel, linaro-kernel, linux-kernel, Mark Brown

From: Mark Brown <broonie@linaro.org>

Since the conversion to regmap there has been no need for device level
locking for I/O as regmap provides locking so remove the locks.

Signed-off-by: Mark Brown <broonie@linaro.org>
---
 drivers/mfd/mc13xxx-core.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/mfd/mc13xxx-core.c b/drivers/mfd/mc13xxx-core.c
index 2a9b100..dbbf8ee 100644
--- a/drivers/mfd/mc13xxx-core.c
+++ b/drivers/mfd/mc13xxx-core.c
@@ -158,8 +158,6 @@ int mc13xxx_reg_read(struct mc13xxx *mc13xxx, unsigned int offset, u32 *val)
 {
 	int ret;
 
-	BUG_ON(!mutex_is_locked(&mc13xxx->lock));
-
 	if (offset > MC13XXX_NUMREGS)
 		return -EINVAL;
 
@@ -172,8 +170,6 @@ EXPORT_SYMBOL(mc13xxx_reg_read);
 
 int mc13xxx_reg_write(struct mc13xxx *mc13xxx, unsigned int offset, u32 val)
 {
-	BUG_ON(!mutex_is_locked(&mc13xxx->lock));
-
 	dev_vdbg(mc13xxx->dev, "[0x%02x] <- 0x%06x\n", offset, val);
 
 	if (offset > MC13XXX_NUMREGS || val > 0xffffff)
@@ -186,7 +182,6 @@ EXPORT_SYMBOL(mc13xxx_reg_write);
 int mc13xxx_reg_rmw(struct mc13xxx *mc13xxx, unsigned int offset,
 		u32 mask, u32 val)
 {
-	BUG_ON(!mutex_is_locked(&mc13xxx->lock));
 	BUG_ON(val & ~mask);
 	dev_vdbg(mc13xxx->dev, "[0x%02x] <- 0x%06x (mask: 0x%06x)\n",
 			offset, val, mask);
-- 
1.8.4.rc3

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

end of thread, other threads:[~2013-09-23 18:14 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 18:06 [PATCH 1/3] mfd: mc13xxx: Don't require lock for simple register I/O Mark Brown
2013-09-18 18:06 ` [PATCH 2/3] mfd: mc13xxx: Move SPI erratum workaround into SPI I/O function Mark Brown
2013-09-19  9:13   ` Lee Jones
2013-09-19  9:56     ` Mark Brown
2013-09-19 10:04       ` Lee Jones
2013-09-19 11:41         ` Mark Brown
2013-09-19 11:49           ` Lee Jones
2013-09-19 12:09             ` Mark Brown
2013-09-18 18:06 ` [PATCH 3/3] ASoC: mc13783: Use regmap directly from ASoC Mark Brown
  -- strict thread matches above, loose matches on Subject: below --
2013-09-23 18:14 [PATCH 1/3] mfd: mc13xxx: Don't require lock for simple register I/O Mark Brown
2013-09-23 18:14 ` [PATCH 3/3] ASoC: mc13783: Use regmap directly from ASoC 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).