diff options
Diffstat (limited to 'sound/oss/emu10k1')
-rw-r--r-- | sound/oss/emu10k1/audio.c | 2 | ||||
-rw-r--r-- | sound/oss/emu10k1/main.c | 11 | ||||
-rw-r--r-- | sound/oss/emu10k1/midi.c | 2 | ||||
-rw-r--r-- | sound/oss/emu10k1/mixer.c | 2 |
4 files changed, 6 insertions, 11 deletions
diff --git a/sound/oss/emu10k1/audio.c b/sound/oss/emu10k1/audio.c index efcf589d7083..e75ea21eb811 100644 --- a/sound/oss/emu10k1/audio.c +++ b/sound/oss/emu10k1/audio.c @@ -1582,7 +1582,7 @@ static void emu10k1_waveout_bh(unsigned long refdata) return; } -struct file_operations emu10k1_audio_fops = { +const struct file_operations emu10k1_audio_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .read = emu10k1_audio_read, diff --git a/sound/oss/emu10k1/main.c b/sound/oss/emu10k1/main.c index 6c59df7b0001..16ac02540a3f 100644 --- a/sound/oss/emu10k1/main.c +++ b/sound/oss/emu10k1/main.c @@ -455,15 +455,13 @@ static int __devinit emu10k1_midi_init(struct emu10k1_card *card) { int ret; - card->mpuout = kmalloc(sizeof(struct emu10k1_mpuout), GFP_KERNEL); + card->mpuout = kzalloc(sizeof(struct emu10k1_mpuout), GFP_KERNEL); if (card->mpuout == NULL) { printk(KERN_WARNING "emu10k1: Unable to allocate emu10k1_mpuout: out of memory\n"); ret = -ENOMEM; goto err_out1; } - memset(card->mpuout, 0, sizeof(struct emu10k1_mpuout)); - card->mpuout->intr = 1; card->mpuout->status = FLAGS_AVAILABLE; card->mpuout->state = CARDMIDIOUT_STATE_DEFAULT; @@ -472,15 +470,13 @@ static int __devinit emu10k1_midi_init(struct emu10k1_card *card) spin_lock_init(&card->mpuout->lock); - card->mpuin = kmalloc(sizeof(struct emu10k1_mpuin), GFP_KERNEL); + card->mpuin = kzalloc(sizeof(struct emu10k1_mpuin), GFP_KERNEL); if (card->mpuin == NULL) { printk(KERN_WARNING "emu10k1: Unable to allocate emu10k1_mpuin: out of memory\n"); ret = -ENOMEM; goto err_out2; } - memset(card->mpuin, 0, sizeof(struct emu10k1_mpuin)); - card->mpuin->status = FLAGS_AVAILABLE; tasklet_init(&card->mpuin->tasklet, emu10k1_mpuin_bh, (unsigned long) card->mpuin); @@ -1280,11 +1276,10 @@ static int __devinit emu10k1_probe(struct pci_dev *pci_dev, const struct pci_dev pci_set_master(pci_dev); - if ((card = kmalloc(sizeof(struct emu10k1_card), GFP_KERNEL)) == NULL) { + if ((card = kzalloc(sizeof(struct emu10k1_card), GFP_KERNEL)) == NULL) { printk(KERN_ERR "emu10k1: out of memory\n"); return -ENOMEM; } - memset(card, 0, sizeof(struct emu10k1_card)); card->iobase = pci_resource_start(pci_dev, 0); card->length = pci_resource_len(pci_dev, 0); diff --git a/sound/oss/emu10k1/midi.c b/sound/oss/emu10k1/midi.c index cca3dad2bdf4..df1e990449a0 100644 --- a/sound/oss/emu10k1/midi.c +++ b/sound/oss/emu10k1/midi.c @@ -458,7 +458,7 @@ int emu10k1_midi_callback(unsigned long msg, unsigned long refdata, unsigned lon } /* MIDI file operations */ -struct file_operations emu10k1_midi_fops = { +const struct file_operations emu10k1_midi_fops = { .owner = THIS_MODULE, .read = emu10k1_midi_read, .write = emu10k1_midi_write, diff --git a/sound/oss/emu10k1/mixer.c b/sound/oss/emu10k1/mixer.c index 6419796c2ed7..bc3805fb0701 100644 --- a/sound/oss/emu10k1/mixer.c +++ b/sound/oss/emu10k1/mixer.c @@ -681,7 +681,7 @@ static int emu10k1_mixer_release(struct inode *inode, struct file *file) return 0; } -struct file_operations emu10k1_mixer_fops = { +const struct file_operations emu10k1_mixer_fops = { .owner = THIS_MODULE, .llseek = no_llseek, .ioctl = emu10k1_mixer_ioctl, |