aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/omap/mcbsp.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/soc/omap/mcbsp.c')
-rw-r--r--sound/soc/omap/mcbsp.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
index 06fec5699cc8..7a54e3083203 100644
--- a/sound/soc/omap/mcbsp.c
+++ b/sound/soc/omap/mcbsp.c
@@ -835,15 +835,11 @@ static ssize_t dma_op_mode_store(struct device *dev,
835 const char *buf, size_t size) 835 const char *buf, size_t size)
836{ 836{
837 struct omap_mcbsp *mcbsp = dev_get_drvdata(dev); 837 struct omap_mcbsp *mcbsp = dev_get_drvdata(dev);
838 const char * const *s; 838 int i;
839 int i = 0;
840
841 for (s = &dma_op_modes[i]; i < ARRAY_SIZE(dma_op_modes); s++, i++)
842 if (sysfs_streq(buf, *s))
843 break;
844 839
845 if (i == ARRAY_SIZE(dma_op_modes)) 840 i = sysfs_match_string(dma_op_modes, buf);
846 return -EINVAL; 841 if (i < 0)
842 return i;
847 843
848 spin_lock_irq(&mcbsp->lock); 844 spin_lock_irq(&mcbsp->lock);
849 if (!mcbsp->free) { 845 if (!mcbsp->free) {