aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/emu10k1/emufx.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/emu10k1/emufx.c')
-rw-r--r--sound/pci/emu10k1/emufx.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/sound/pci/emu10k1/emufx.c b/sound/pci/emu10k1/emufx.c
index febdd130a209..5967e60119fb 100644
--- a/sound/pci/emu10k1/emufx.c
+++ b/sound/pci/emu10k1/emufx.c
@@ -2440,14 +2440,13 @@ static void copy_string(char *dst, char *src, char *null, int idx)
2440 strcpy(dst, src); 2440 strcpy(dst, src);
2441} 2441}
2442 2442
2443static int snd_emu10k1_fx8010_info(struct snd_emu10k1 *emu, 2443static void snd_emu10k1_fx8010_info(struct snd_emu10k1 *emu,
2444 struct snd_emu10k1_fx8010_info *info) 2444 struct snd_emu10k1_fx8010_info *info)
2445{ 2445{
2446 char **fxbus, **extin, **extout; 2446 char **fxbus, **extin, **extout;
2447 unsigned short fxbus_mask, extin_mask, extout_mask; 2447 unsigned short fxbus_mask, extin_mask, extout_mask;
2448 int res; 2448 int res;
2449 2449
2450 memset(info, 0, sizeof(info));
2451 info->internal_tram_size = emu->fx8010.itram_size; 2450 info->internal_tram_size = emu->fx8010.itram_size;
2452 info->external_tram_size = emu->fx8010.etram_pages.bytes / 2; 2451 info->external_tram_size = emu->fx8010.etram_pages.bytes / 2;
2453 fxbus = fxbuses; 2452 fxbus = fxbuses;
@@ -2464,7 +2463,6 @@ static int snd_emu10k1_fx8010_info(struct snd_emu10k1 *emu,
2464 for (res = 16; res < 32; res++, extout++) 2463 for (res = 16; res < 32; res++, extout++)
2465 copy_string(info->extout_names[res], extout_mask & (1 << res) ? *extout : NULL, "Unused", res); 2464 copy_string(info->extout_names[res], extout_mask & (1 << res) ? *extout : NULL, "Unused", res);
2466 info->gpr_controls = emu->fx8010.gpr_count; 2465 info->gpr_controls = emu->fx8010.gpr_count;
2467 return 0;
2468} 2466}
2469 2467
2470static int snd_emu10k1_fx8010_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg) 2468static int snd_emu10k1_fx8010_ioctl(struct snd_hwdep * hw, struct file *file, unsigned int cmd, unsigned long arg)
@@ -2485,10 +2483,7 @@ static int snd_emu10k1_fx8010_ioctl(struct snd_hwdep * hw, struct file *file, un
2485 info = kmalloc(sizeof(*info), GFP_KERNEL); 2483 info = kmalloc(sizeof(*info), GFP_KERNEL);
2486 if (!info) 2484 if (!info)
2487 return -ENOMEM; 2485 return -ENOMEM;
2488 if ((res = snd_emu10k1_fx8010_info(emu, info)) < 0) { 2486 snd_emu10k1_fx8010_info(emu, info);
2489 kfree(info);
2490 return res;
2491 }
2492 if (copy_to_user(argp, info, sizeof(*info))) { 2487 if (copy_to_user(argp, info, sizeof(*info))) {
2493 kfree(info); 2488 kfree(info);
2494 return -EFAULT; 2489 return -EFAULT;