Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 25670
b: refs/heads/master
c: f6596f9
h: refs/heads/master
v: v3
  • Loading branch information
Zach Brown authored and David S. Miller committed Apr 12, 2006
1 parent 7d41aed commit 35adbe2
Show file tree
Hide file tree
Showing 34 changed files with 184 additions and 170 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: dcccdd938ef0c5d96145957217b814b14bd46cdc
refs/heads/master: f6596f9d2b4f0255f6cd68c76b85fe4cec6352af
3 changes: 2 additions & 1 deletion 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 -- */
void *file;
struct snd_pcm_file *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,6 +898,7 @@ 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
18 changes: 12 additions & 6 deletions trunk/net/ipv6/reassembly.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ static __inline__ void fq_unlink(struct frag_queue *fq)
write_unlock(&ip6_frag_lock);
}

/*
* callers should be careful not to use the hash value outside the ipfrag_lock
* as doing so could race with ipfrag_hash_rnd being recalculated.
*/
static unsigned int ip6qhashfn(u32 id, struct in6_addr *saddr,
struct in6_addr *daddr)
{
Expand Down Expand Up @@ -324,15 +328,16 @@ static void ip6_frag_expire(unsigned long data)
/* Creation primitives. */


static struct frag_queue *ip6_frag_intern(unsigned int hash,
struct frag_queue *fq_in)
static struct frag_queue *ip6_frag_intern(struct frag_queue *fq_in)
{
struct frag_queue *fq;
unsigned int hash;
#ifdef CONFIG_SMP
struct hlist_node *n;
#endif

write_lock(&ip6_frag_lock);
hash = ip6qhashfn(fq_in->id, &fq_in->saddr, &fq_in->daddr);
#ifdef CONFIG_SMP
hlist_for_each_entry(fq, n, &ip6_frag_hash[hash], list) {
if (fq->id == fq_in->id &&
Expand Down Expand Up @@ -362,7 +367,7 @@ static struct frag_queue *ip6_frag_intern(unsigned int hash,


static struct frag_queue *
ip6_frag_create(unsigned int hash, u32 id, struct in6_addr *src, struct in6_addr *dst)
ip6_frag_create(u32 id, struct in6_addr *src, struct in6_addr *dst)
{
struct frag_queue *fq;

Expand All @@ -379,7 +384,7 @@ ip6_frag_create(unsigned int hash, u32 id, struct in6_addr *src, struct in6_addr
spin_lock_init(&fq->lock);
atomic_set(&fq->refcnt, 1);

return ip6_frag_intern(hash, fq);
return ip6_frag_intern(fq);

oom:
IP6_INC_STATS_BH(IPSTATS_MIB_REASMFAILS);
Expand All @@ -391,9 +396,10 @@ fq_find(u32 id, struct in6_addr *src, struct in6_addr *dst)
{
struct frag_queue *fq;
struct hlist_node *n;
unsigned int hash = ip6qhashfn(id, src, dst);
unsigned int hash;

read_lock(&ip6_frag_lock);
hash = ip6qhashfn(id, src, dst);
hlist_for_each_entry(fq, n, &ip6_frag_hash[hash], list) {
if (fq->id == id &&
ipv6_addr_equal(src, &fq->saddr) &&
Expand All @@ -405,7 +411,7 @@ fq_find(u32 id, struct in6_addr *src, struct in6_addr *dst)
}
read_unlock(&ip6_frag_lock);

return ip6_frag_create(hash, id, src, dst);
return ip6_frag_create(id, src, dst);
}


Expand Down
7 changes: 3 additions & 4 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 if (setup->block)
else
substream->ffile->f_flags &= ~O_NONBLOCK;
runtime = substream->runtime;
runtime->oss.params = 1;
Expand Down Expand Up @@ -1757,11 +1757,10 @@ 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 @@ -1810,7 +1809,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),
};

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

errout:
snd_ad1848_unregister_all();
return err;
}

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

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

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

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

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

errout:
snd_cmi8330_unregister_all();
return err;
}

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

errout:
snd_cs4231_unregister_all();
return err;
}

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

errout:
snd_cs423x_unregister_all();
return err;
}

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

errout:
snd_es1688_unregister_all();
return err;
}

static void __exit alsa_card_es1688_exit(void)
Expand Down
16 changes: 9 additions & 7 deletions trunk/sound/isa/es18xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -2391,11 +2391,9 @@ static int __init alsa_card_es18xx_init(void)
continue;
device = platform_device_register_simple(ES18XX_DRIVER,
i, NULL, 0);
if (IS_ERR(device))
continue;
if (!platform_get_drvdata(device)) {
platform_device_unregister(device);
continue;
if (IS_ERR(device)) {
err = PTR_ERR(device);
goto errout;
}
platform_devices[i] = device;
cards++;
Expand All @@ -2413,10 +2411,14 @@ 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
snd_es18xx_unregister_all();
return -ENODEV;
err = -ENODEV;
goto errout;
}
return 0;

errout:
snd_es18xx_unregister_all();
return err;
}

static void __exit alsa_card_es18xx_exit(void)
Expand Down
Loading

0 comments on commit 35adbe2

Please sign in to comment.