aboutsummaryrefslogtreecommitdiffstats
path: root/sound/ppc
diff options
context:
space:
mode:
authorPanagiotis Issaris <takis@issaris.org>2006-07-25 09:28:03 -0400
committerJaroslav Kysela <perex@suse.cz>2006-08-03 09:21:18 -0400
commit59feddb25f9d925e86ee22596802405788bc050f (patch)
tree0d272bdcb64cf2bcc19adf8735215ce261aea355 /sound/ppc
parentfb6a0d635d4ff6b3555179d0154981f03427071a (diff)
[ALSA] Conversions from kmalloc+memset to k(z|c)alloc
sound: Conversions from kmalloc+memset to k(c|z)alloc. Signed-off-by: Panagiotis Issaris <takis@issaris.org> Signed-off-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/ppc')
-rw-r--r--sound/ppc/awacs.c3
-rw-r--r--sound/ppc/daca.c3
-rw-r--r--sound/ppc/keywest.c3
-rw-r--r--sound/ppc/tumbler.c3
4 files changed, 4 insertions, 8 deletions
diff --git a/sound/ppc/awacs.c b/sound/ppc/awacs.c
index 82d791be7499..05dabe454658 100644
--- a/sound/ppc/awacs.c
+++ b/sound/ppc/awacs.c
@@ -801,11 +801,10 @@ snd_pmac_awacs_init(struct snd_pmac *chip)
801 chip->revision = (in_le32(&chip->awacs->codec_stat) >> 12) & 0xf; 801 chip->revision = (in_le32(&chip->awacs->codec_stat) >> 12) & 0xf;
802#ifdef PMAC_AMP_AVAIL 802#ifdef PMAC_AMP_AVAIL
803 if (chip->revision == 3 && chip->has_iic && CHECK_CUDA_AMP()) { 803 if (chip->revision == 3 && chip->has_iic && CHECK_CUDA_AMP()) {
804 struct awacs_amp *amp = kmalloc(sizeof(*amp), GFP_KERNEL); 804 struct awacs_amp *amp = kzalloc(sizeof(*amp), GFP_KERNEL);
805 if (! amp) 805 if (! amp)
806 return -ENOMEM; 806 return -ENOMEM;
807 chip->mixer_data = amp; 807 chip->mixer_data = amp;
808 memset(amp, 0, sizeof(*amp));
809 chip->mixer_free = awacs_amp_free; 808 chip->mixer_free = awacs_amp_free;
810 awacs_amp_set_vol(amp, 0, 63, 63, 0); /* mute and zero vol */ 809 awacs_amp_set_vol(amp, 0, 63, 63, 0); /* mute and zero vol */
811 awacs_amp_set_vol(amp, 1, 63, 63, 0); 810 awacs_amp_set_vol(amp, 1, 63, 63, 0);
diff --git a/sound/ppc/daca.c b/sound/ppc/daca.c
index 46eebf5610e3..57202b0f033e 100644
--- a/sound/ppc/daca.c
+++ b/sound/ppc/daca.c
@@ -258,10 +258,9 @@ int __init snd_pmac_daca_init(struct snd_pmac *chip)
258 request_module("i2c-powermac"); 258 request_module("i2c-powermac");
259#endif /* CONFIG_KMOD */ 259#endif /* CONFIG_KMOD */
260 260
261 mix = kmalloc(sizeof(*mix), GFP_KERNEL); 261 mix = kzalloc(sizeof(*mix), GFP_KERNEL);
262 if (! mix) 262 if (! mix)
263 return -ENOMEM; 263 return -ENOMEM;
264 memset(mix, 0, sizeof(*mix));
265 chip->mixer_data = mix; 264 chip->mixer_data = mix;
266 chip->mixer_free = daca_cleanup; 265 chip->mixer_free = daca_cleanup;
267 mix->amp_on = 1; /* default on */ 266 mix->amp_on = 1; /* default on */
diff --git a/sound/ppc/keywest.c b/sound/ppc/keywest.c
index fb05938dcbd9..59482a4cd446 100644
--- a/sound/ppc/keywest.c
+++ b/sound/ppc/keywest.c
@@ -64,11 +64,10 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
64 if (strncmp(i2c_device_name(adapter), "mac-io", 6)) 64 if (strncmp(i2c_device_name(adapter), "mac-io", 6))
65 return 0; /* ignored */ 65 return 0; /* ignored */
66 66
67 new_client = kmalloc(sizeof(struct i2c_client), GFP_KERNEL); 67 new_client = kzalloc(sizeof(struct i2c_client), GFP_KERNEL);
68 if (! new_client) 68 if (! new_client)
69 return -ENOMEM; 69 return -ENOMEM;
70 70
71 memset(new_client, 0, sizeof(*new_client));
72 new_client->addr = keywest_ctx->addr; 71 new_client->addr = keywest_ctx->addr;
73 i2c_set_clientdata(new_client, keywest_ctx); 72 i2c_set_clientdata(new_client, keywest_ctx);
74 new_client->adapter = adapter; 73 new_client->adapter = adapter;
diff --git a/sound/ppc/tumbler.c b/sound/ppc/tumbler.c
index 692c61177678..84f6b19c07ca 100644
--- a/sound/ppc/tumbler.c
+++ b/sound/ppc/tumbler.c
@@ -1316,10 +1316,9 @@ int __init snd_pmac_tumbler_init(struct snd_pmac *chip)
1316 request_module("i2c-powermac"); 1316 request_module("i2c-powermac");
1317#endif /* CONFIG_KMOD */ 1317#endif /* CONFIG_KMOD */
1318 1318
1319 mix = kmalloc(sizeof(*mix), GFP_KERNEL); 1319 mix = kzalloc(sizeof(*mix), GFP_KERNEL);
1320 if (! mix) 1320 if (! mix)
1321 return -ENOMEM; 1321 return -ENOMEM;
1322 memset(mix, 0, sizeof(*mix));
1323 mix->headphone_irq = -1; 1322 mix->headphone_irq = -1;
1324 1323
1325 chip->mixer_data = mix; 1324 chip->mixer_data = mix;