Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25676
b: refs/heads/master
c: 6762b47
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Apr 12, 2006
1 parent 0999223 commit 9daf592
Show file tree
Hide file tree
Showing 33 changed files with 164 additions and 172 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 052bb88e180d010f7da7186e6f21eea3be82a903
refs/heads/master: 6762b47a74264152eeda5ac7516732fe9be265a7
3 changes: 1 addition & 2 deletions trunk/include/sound/pcm.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ struct snd_pcm_substream {
struct snd_pcm_group self_group; /* fake group for non linked substream (with substream lock inside) */
struct snd_pcm_group *group; /* pointer to current group */
/* -- assigned files -- */
struct snd_pcm_file *file;
void *file;
struct file *ffile;
void (*pcm_release)(struct snd_pcm_substream *);
#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
Expand Down Expand Up @@ -898,7 +898,6 @@ ssize_t snd_pcm_format_size(snd_pcm_format_t format, size_t samples);
const unsigned char *snd_pcm_format_silence_64(snd_pcm_format_t format);
int snd_pcm_format_set_silence(snd_pcm_format_t format, void *buf, unsigned int frames);
snd_pcm_format_t snd_pcm_build_linear_format(int width, int unsignd, int big_endian);
const char *snd_pcm_format_name(snd_pcm_format_t format);

void snd_pcm_set_ops(struct snd_pcm * pcm, int direction, struct snd_pcm_ops *ops);
void snd_pcm_set_sync(struct snd_pcm_substream *substream);
Expand Down
7 changes: 4 additions & 3 deletions trunk/sound/core/oss/pcm_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1682,7 +1682,7 @@ static void snd_pcm_oss_init_substream(struct snd_pcm_substream *substream,
substream->oss.setup = *setup;
if (setup->nonblock)
substream->ffile->f_flags |= O_NONBLOCK;
else
else if (setup->block)
substream->ffile->f_flags &= ~O_NONBLOCK;
runtime = substream->runtime;
runtime->oss.params = 1;
Expand Down Expand Up @@ -1757,10 +1757,11 @@ static int snd_pcm_oss_open_file(struct file *file,
}

pcm_oss_file->streams[idx] = substream;
substream->file = pcm_oss_file;
snd_pcm_oss_init_substream(substream, &setup[idx], minor);
}

if (! pcm_oss_file->streams[0] && pcm_oss_file->streams[1]) {
if (!pcm_oss_file->streams[0] && !pcm_oss_file->streams[1]) {
snd_pcm_oss_release_file(pcm_oss_file);
return -EINVAL;
}
Expand Down Expand Up @@ -1809,7 +1810,7 @@ static int snd_pcm_oss_open(struct inode *inode, struct file *file)
err = -EFAULT;
goto __error;
}
memset(setup, 0, sizeof(*setup));
memset(setup, 0, sizeof(setup));
if (file->f_mode & FMODE_WRITE)
snd_pcm_oss_look_for_setup(pcm, SNDRV_PCM_STREAM_PLAYBACK,
task_name, &setup[0]);
Expand Down
2 changes: 1 addition & 1 deletion trunk/sound/core/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static char *snd_pcm_format_names[] = {
FORMAT(U18_3BE),
};

const char *snd_pcm_format_name(snd_pcm_format_t format)
static const char *snd_pcm_format_name(snd_pcm_format_t format)
{
return snd_pcm_format_names[format];
}
Expand Down
6 changes: 4 additions & 2 deletions trunk/sound/core/pcm_native.c
Original file line number Diff line number Diff line change
Expand Up @@ -2007,14 +2007,16 @@ static void pcm_release_private(struct snd_pcm_substream *substream)
void snd_pcm_release_substream(struct snd_pcm_substream *substream)
{
snd_pcm_drop(substream);
if (substream->pcm_release)
substream->pcm_release(substream);
if (substream->hw_opened) {
if (substream->ops->hw_free != NULL)
substream->ops->hw_free(substream);
substream->ops->close(substream);
substream->hw_opened = 0;
}
if (substream->pcm_release) {
substream->pcm_release(substream);
substream->pcm_release = NULL;
}
snd_pcm_detach_substream(substream);
}

Expand Down
16 changes: 7 additions & 9 deletions trunk/sound/isa/ad1848/ad1848.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,11 @@ static int __init alsa_card_ad1848_init(void)
continue;
device = platform_device_register_simple(SND_AD1848_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
err = PTR_ERR(device);
goto errout;
if (IS_ERR(device))
continue;
if (!platform_get_drvdata(device)) {
platform_device_unregister(device);
continue;
}
devices[i] = device;
cards++;
Expand All @@ -204,14 +206,10 @@ static int __init alsa_card_ad1848_init(void)
#ifdef MODULE
printk(KERN_ERR "AD1848 soundcard not found or device busy\n");
#endif
err = -ENODEV;
goto errout;
snd_ad1848_unregister_all();
return -ENODEV;
}
return 0;

errout:
snd_ad1848_unregister_all();
return err;
}

static void __exit alsa_card_ad1848_exit(void)
Expand Down
11 changes: 7 additions & 4 deletions trunk/sound/isa/adlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ static int __devinit snd_adlib_probe(struct platform_device *device)
struct snd_card *card;
struct snd_opl3 *opl3;

int error;
int i = device->id;
int error, i = device->id;

if (port[i] == SNDRV_AUTO_PORT) {
snd_printk(KERN_ERR DRV_NAME ": please specify port\n");
Expand Down Expand Up @@ -95,8 +94,7 @@ static int __devinit snd_adlib_probe(struct platform_device *device)
return 0;

out1: snd_card_free(card);
out0: error = -EINVAL; /* FIXME: should be the original error code */
return error;
out0: return error;
}

static int __devexit snd_adlib_remove(struct platform_device *device)
Expand Down Expand Up @@ -134,6 +132,11 @@ static int __init alsa_card_adlib_init(void)
if (IS_ERR(device))
continue;

if (!platform_get_drvdata(device)) {
platform_device_unregister(device);
continue;
}

devices[i] = device;
cards++;
}
Expand Down
16 changes: 7 additions & 9 deletions trunk/sound/isa/cmi8330.c
Original file line number Diff line number Diff line change
Expand Up @@ -699,9 +699,11 @@ static int __init alsa_card_cmi8330_init(void)
continue;
device = platform_device_register_simple(CMI8330_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
err = PTR_ERR(device);
goto errout;
if (IS_ERR(device))
continue;
if (!platform_get_drvdata(device)) {
platform_device_unregister(device);
continue;
}
platform_devices[i] = device;
cards++;
Expand All @@ -719,14 +721,10 @@ static int __init alsa_card_cmi8330_init(void)
#ifdef MODULE
snd_printk(KERN_ERR "CMI8330 not found or device busy\n");
#endif
err = -ENODEV;
goto errout;
snd_cmi8330_unregister_all();
return -ENODEV;
}
return 0;

errout:
snd_cmi8330_unregister_all();
return err;
}

static void __exit alsa_card_cmi8330_exit(void)
Expand Down
16 changes: 7 additions & 9 deletions trunk/sound/isa/cs423x/cs4231.c
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,11 @@ static int __init alsa_card_cs4231_init(void)
continue;
device = platform_device_register_simple(SND_CS4231_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
err = PTR_ERR(device);
goto errout;
if (IS_ERR(device))
continue;
if (!platform_get_drvdata(device)) {
platform_device_unregister(device);
continue;
}
devices[i] = device;
cards++;
Expand All @@ -220,14 +222,10 @@ static int __init alsa_card_cs4231_init(void)
#ifdef MODULE
printk(KERN_ERR "CS4231 soundcard not found or device busy\n");
#endif
err = -ENODEV;
goto errout;
snd_cs4231_unregister_all();
return -ENODEV;
}
return 0;

errout:
snd_cs4231_unregister_all();
return err;
}

static void __exit alsa_card_cs4231_exit(void)
Expand Down
16 changes: 7 additions & 9 deletions trunk/sound/isa/cs423x/cs4236.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,9 +780,11 @@ static int __init alsa_card_cs423x_init(void)
continue;
device = platform_device_register_simple(CS423X_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
err = PTR_ERR(device);
goto errout;
if (IS_ERR(device))
continue;
if (!platform_get_drvdata(device)) {
platform_device_unregister(device);
continue;
}
platform_devices[i] = device;
snd_cs423x_devices++;
Expand All @@ -802,14 +804,10 @@ static int __init alsa_card_cs423x_init(void)
#ifdef MODULE
printk(KERN_ERR IDENT " soundcard not found or device busy\n");
#endif
err = -ENODEV;
goto errout;
snd_cs423x_unregister_all();
return -ENODEV;
}
return 0;

errout:
snd_cs423x_unregister_all();
return err;
}

static void __exit alsa_card_cs423x_exit(void)
Expand Down
16 changes: 7 additions & 9 deletions trunk/sound/isa/es1688/es1688.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,11 @@ static int __init alsa_card_es1688_init(void)
continue;
device = platform_device_register_simple(ES1688_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
err = PTR_ERR(device);
goto errout;
if (IS_ERR(device))
continue;
if (!platform_get_drvdata(device)) {
platform_device_unregister(device);
continue;
}
devices[i] = device;
cards++;
Expand All @@ -224,14 +226,10 @@ static int __init alsa_card_es1688_init(void)
#ifdef MODULE
printk(KERN_ERR "ESS AudioDrive ES1688 soundcard not found or device busy\n");
#endif
err = -ENODEV;
goto errout;
snd_es1688_unregister_all();
return -ENODEV;
}
return 0;

errout:
snd_es1688_unregister_all();
return err;
}

static void __exit alsa_card_es1688_exit(void)
Expand Down
16 changes: 7 additions & 9 deletions trunk/sound/isa/es18xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2391,9 +2391,11 @@ static int __init alsa_card_es18xx_init(void)
continue;
device = platform_device_register_simple(ES18XX_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
err = PTR_ERR(device);
goto errout;
if (IS_ERR(device))
continue;
if (!platform_get_drvdata(device)) {
platform_device_unregister(device);
continue;
}
platform_devices[i] = device;
cards++;
Expand All @@ -2411,14 +2413,10 @@ static int __init alsa_card_es18xx_init(void)
#ifdef MODULE
snd_printk(KERN_ERR "ESS AudioDrive ES18xx soundcard not found or device busy\n");
#endif
err = -ENODEV;
goto errout;
snd_es18xx_unregister_all();
return -ENODEV;
}
return 0;

errout:
snd_es18xx_unregister_all();
return err;
}

static void __exit alsa_card_es18xx_exit(void)
Expand Down
16 changes: 7 additions & 9 deletions trunk/sound/isa/gus/gusclassic.c
Original file line number Diff line number Diff line change
Expand Up @@ -253,9 +253,11 @@ static int __init alsa_card_gusclassic_init(void)
continue;
device = platform_device_register_simple(GUSCLASSIC_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
err = PTR_ERR(device);
goto errout;
if (IS_ERR(device))
continue;
if (!platform_get_drvdata(device)) {
platform_device_unregister(device);
continue;
}
devices[i] = device;
cards++;
Expand All @@ -264,14 +266,10 @@ static int __init alsa_card_gusclassic_init(void)
#ifdef MODULE
printk(KERN_ERR "GUS Classic soundcard not found or device busy\n");
#endif
err = -ENODEV;
goto errout;
snd_gusclassic_unregister_all();
return -ENODEV;
}
return 0;

errout:
snd_gusclassic_unregister_all();
return err;
}

static void __exit alsa_card_gusclassic_exit(void)
Expand Down
16 changes: 7 additions & 9 deletions trunk/sound/isa/gus/gusextreme.c
Original file line number Diff line number Diff line change
Expand Up @@ -363,9 +363,11 @@ static int __init alsa_card_gusextreme_init(void)
continue;
device = platform_device_register_simple(GUSEXTREME_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
err = PTR_ERR(device);
goto errout;
if (IS_ERR(device))
continue;
if (!platform_get_drvdata(device)) {
platform_device_unregister(device);
continue;
}
devices[i] = device;
cards++;
Expand All @@ -374,14 +376,10 @@ static int __init alsa_card_gusextreme_init(void)
#ifdef MODULE
printk(KERN_ERR "GUS Extreme soundcard not found or device busy\n");
#endif
err = -ENODEV;
goto errout;
snd_gusextreme_unregister_all();
return -ENODEV;
}
return 0;

errout:
snd_gusextreme_unregister_all();
return err;
}

static void __exit alsa_card_gusextreme_exit(void)
Expand Down
16 changes: 7 additions & 9 deletions trunk/sound/isa/gus/gusmax.c
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,11 @@ static int __init alsa_card_gusmax_init(void)
continue;
device = platform_device_register_simple(GUSMAX_DRIVER,
i, NULL, 0);
if (IS_ERR(device)) {
err = PTR_ERR(device);
goto errout;
if (IS_ERR(device))
continue;
if (!platform_get_drvdata(device)) {
platform_device_unregister(device);
continue;
}
devices[i] = device;
cards++;
Expand All @@ -401,14 +403,10 @@ static int __init alsa_card_gusmax_init(void)
#ifdef MODULE
printk(KERN_ERR "GUS MAX soundcard not found or device busy\n");
#endif
err = -ENODEV;
goto errout;
snd_gusmax_unregister_all();
return -ENODEV;
}
return 0;

errout:
snd_gusmax_unregister_all();
return err;
}

static void __exit alsa_card_gusmax_exit(void)
Expand Down
Loading

0 comments on commit 9daf592

Please sign in to comment.