summaryrefslogtreecommitdiff
path: root/sound/aoa/soundbus/i2sbus
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-10-23 15:57:39 +0400
committerTakashi Iwai <tiwai@suse.de>2008-10-23 20:21:40 +0400
commit9f50bbad8fc3b0f9fd453ab1e2716b3106d89b13 (patch)
treeb160659657522bf9e2bf0e120df4e344c8c01939 /sound/aoa/soundbus/i2sbus
parent13095c37b29b90ec96070cb63400a79737b4a185 (diff)
downloadlinux-9f50bbad8fc3b0f9fd453ab1e2716b3106d89b13.tar.xz
ALSA: aoa i2sbus: don't overwrite module parameter
We shouldn't modify a global variable here. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/aoa/soundbus/i2sbus')
-rw-r--r--sound/aoa/soundbus/i2sbus/i2sbus-core.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/aoa/soundbus/i2sbus/i2sbus-core.c b/sound/aoa/soundbus/i2sbus/i2sbus-core.c
index e6beb92c6933..b4590df07466 100644
--- a/sound/aoa/soundbus/i2sbus/i2sbus-core.c
+++ b/sound/aoa/soundbus/i2sbus/i2sbus-core.c
@@ -159,7 +159,7 @@ static int i2sbus_add_dev(struct macio_dev *macio,
struct i2sbus_dev *dev;
struct device_node *child = NULL, *sound = NULL;
struct resource *r;
- int i, layout = 0, rlen;
+ int i, layout = 0, rlen, ok = force;
static const char *rnames[] = { "i2sbus: %s (control)",
"i2sbus: %s (tx)",
"i2sbus: %s (rx)" };
@@ -192,7 +192,7 @@ static int i2sbus_add_dev(struct macio_dev *macio,
layout = *layout_id;
snprintf(dev->sound.modalias, 32,
"sound-layout-%d", layout);
- force = 1;
+ ok = 1;
}
}
/* for the time being, until we can handle non-layout-id
@@ -201,7 +201,7 @@ static int i2sbus_add_dev(struct macio_dev *macio,
* When there are two i2s busses and only one has a layout-id,
* then this depends on the order, but that isn't important
* either as the second one in that case is just a modem. */
- if (!force) {
+ if (!ok) {
kfree(dev);
return -ENODEV;
}