lkml.org 
[lkml]   [2000]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] drivers/sound gets __init/__exit/__initdata

Hi

Patch adds __init/__exit/__initdata tags to various sound drivers. I have
reviewed it many times so it should be 100% safe... I have also documented
changes so people know who they should shot ;)

Patch against 2.4.0-test11-pre2.

Please apply...

BTW: Is drivers/sound/Hwmcode.h only in my tree? If not it can be dropped
because we use 724hwmcode.h now...

--
Bartlomiej Zolnierkiewicz
<bkz@linux-ide.org>
diff -uNr linux-240t11p2/drivers/sound/724hwmcode.h linux/drivers/sound/724hwmcode.h
--- linux-240t11p2/drivers/sound/724hwmcode.h Tue Oct 3 00:13:34 2000
+++ linux/drivers/sound/724hwmcode.h Fri Nov 10 19:34:42 2000
@@ -9,7 +9,7 @@
#ifndef _HWMCODE_
#define _HWMCODE_

-static unsigned long int DspInst[] = {
+static unsigned long int DspInst[] __initdata = {
0x00000081, 0x000001a4, 0x0000000a, 0x0000002f,
0x00080253, 0x01800317, 0x0000407b, 0x0000843f,
0x0001483c, 0x0001943c, 0x0005d83c, 0x00001c3c,
@@ -20,7 +20,7 @@
0x00000000, 0x00000000, 0x00000000, 0x00000000
};

-static unsigned long int CntrlInst[] = {
+static unsigned long int CntrlInst[] __initdata = {
0x000007, 0x240007, 0x0C0007, 0x1C0007,
0x060007, 0x700002, 0x000020, 0x030040,
0x007104, 0x004286, 0x030040, 0x000F0D,
@@ -799,7 +799,7 @@
// 04/09?@creat
// 04/12 stop nise fix
// 06/21?@WorkingOff timming
-static unsigned long int CntrlInst1E[] = {
+static unsigned long int CntrlInst1E[] __initdata = {
0x000007, 0x240007, 0x0C0007, 0x1C0007,
0x060007, 0x700002, 0x000020, 0x030040,
0x007104, 0x004286, 0x030040, 0x000F0D,
diff -uNr linux-240t11p2/drivers/sound/cs4232.c linux/drivers/sound/cs4232.c
--- linux-240t11p2/drivers/sound/cs4232.c Tue Oct 3 14:27:47 2000
+++ linux/drivers/sound/cs4232.c Fri Nov 10 21:19:53 2000
@@ -40,6 +40,8 @@
* Christoph Hellwig Adapted to module_init/module_exit,
* simple cleanups
* Arnaldo C. de Melo got rid of attach_uart401
+ * Bartlomiej Zolnierkiewicz
+ * Added some __init/__initdata/__exit
*/

#include <linux/config.h>
@@ -67,7 +69,7 @@
static int synth_base = 0, synth_irq = 0;
static int mpu_detected = 0;

-int probe_cs4232_mpu(struct address_info *hw_config)
+int __init probe_cs4232_mpu(struct address_info *hw_config)
{
/*
* Just write down the config values.
@@ -79,7 +81,7 @@
return 1;
}

-static unsigned char crystal_key[] = /* A 32 byte magic key sequence */
+static unsigned char crystal_key[] __initdata = /* A 32 byte magic key sequence */
{
0x96, 0x35, 0x9a, 0xcd, 0xe6, 0xf3, 0x79, 0xbc,
0x5e, 0xaf, 0x57, 0x2b, 0x15, 0x8a, 0xc5, 0xe2,
@@ -93,7 +95,7 @@
schedule_timeout(howlong);
}

-int probe_cs4232(struct address_info *hw_config)
+int __init probe_cs4232(struct address_info *hw_config)
{
int i, n;
int base = hw_config->io_base, irq = hw_config->irq;
@@ -209,7 +211,7 @@
return 0;
}

-void attach_cs4232(struct address_info *hw_config)
+void __init attach_cs4232(struct address_info *hw_config)
{
int base = hw_config->io_base,
irq = hw_config->irq,
@@ -268,7 +270,7 @@
}
}

-void unload_cs4232(struct address_info *hw_config)
+void __exit unload_cs4232(struct address_info *hw_config)
{
int base = hw_config->io_base, irq = hw_config->irq;
int dma1 = hw_config->dma, dma2 = hw_config->dma2;
diff -uNr linux-240t11p2/drivers/sound/cs4281.c linux/drivers/sound/cs4281.c
--- linux-240t11p2/drivers/sound/cs4281.c Fri Nov 10 14:28:44 2000
+++ linux/drivers/sound/cs4281.c Fri Nov 10 21:20:46 2000
@@ -40,6 +40,7 @@
// libOSSm.so)
// 10/11/00 trw - modified for 2.4.0-test9 kernel enhancements (NR_MAP removal)
// 11/03/00 trw - fixed interrupt loss/stutter, added debug.
+// 11/10/00 bkz - added __devinit to cs4281_hw_init()
//
// *****************************************************************************

@@ -655,7 +656,7 @@
//******************************************************************************
// "Init4281()" -- Bring up the part.
//******************************************************************************
-static int cs4281_hw_init(struct cs4281_state *card)
+static int __devinit cs4281_hw_init(struct cs4281_state *card)
{
u32 ac97_slotid;
u32 temp1, temp2;
diff -uNr linux-240t11p2/drivers/sound/cs461x_image.h linux/drivers/sound/cs461x_image.h
--- linux-240t11p2/drivers/sound/cs461x_image.h Tue Oct 3 00:17:45 2000
+++ linux/drivers/sound/cs461x_image.h Fri Nov 10 20:14:31 2000
@@ -1,4 +1,4 @@
-struct BA1struct BA1Struct = {
+struct BA1struct BA1Struct __initdata = {
{{ 0x00000000, 0x00003000 },{ 0x00010000, 0x00003800 },{ 0x00020000, 0x00007000 }},
{0x00000000,0x00000000,0x00000000,0x00000000,
0x00000000,0x00000000,0x00000000,0x00000000,
diff -uNr linux-240t11p2/drivers/sound/cs46xx.c linux/drivers/sound/cs46xx.c
--- linux-240t11p2/drivers/sound/cs46xx.c Tue Oct 3 14:27:47 2000
+++ linux/drivers/sound/cs46xx.c Fri Nov 10 21:46:58 2000
@@ -25,7 +25,9 @@
* Changes:
* 20000815 Updated driver to kernel 2.4, some cleanups/fixes
* Nils Faerber <nils@kernelconcepts.de>
- *
+ * 20001110 Added __initdata to BA1Struct in cs461x_image.h
+ * and three more __init here
+ * Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
*/

#include <linux/module.h>
@@ -1999,7 +2001,7 @@
/* Boot the card
*/

-static void cs461x_download(struct cs_card *card, u32 *src, unsigned long offset, unsigned long len)
+static void __init cs461x_download(struct cs_card *card, u32 *src, unsigned long offset, unsigned long len)
{
unsigned long counter;
void *dst;
@@ -2024,7 +2026,7 @@

#include "cs461x_image.h"

-static void cs461x_download_image(struct cs_card *card)
+static void __init cs461x_download_image(struct cs_card *card)
{
int idx;
unsigned long offset = 0;
@@ -2240,7 +2242,7 @@



-static int cs_hardware_init(struct cs_card *card)
+static int __init cs_hardware_init(struct cs_card *card)
{
unsigned long end_time;
unsigned int tmp;
diff -uNr linux-240t11p2/drivers/sound/gus_midi.c linux/drivers/sound/gus_midi.c
--- linux-240t11p2/drivers/sound/gus_midi.c Tue Oct 3 00:17:47 2000
+++ linux/drivers/sound/gus_midi.c Fri Nov 10 21:48:10 2000
@@ -9,6 +9,10 @@
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
+ *
+ * Changes:
+ * 11-10-2000 Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+ * Added __init to gus_midi_init()
*/
#include "sound_config.h"

@@ -199,7 +203,7 @@
buffer_status: gus_midi_buffer_status,
};

-void gus_midi_init(struct address_info *hw_config)
+void __init gus_midi_init(struct address_info *hw_config)
{
int dev = sound_alloc_mididev();

diff -uNr linux-240t11p2/drivers/sound/gus_wave.c linux/drivers/sound/gus_wave.c
--- linux-240t11p2/drivers/sound/gus_wave.c Tue Oct 3 00:17:47 2000
+++ linux/drivers/sound/gus_wave.c Fri Nov 10 21:28:07 2000
@@ -14,6 +14,7 @@
* Thomas Sailer : ioctl code reworked (vmalloc/vfree removed)
* Frank van de Pol : Fixed GUS MAX interrupt handling. Enabled simultanious
* usage of CS4231A codec, GUS wave and MIDI for GUS MAX.
+ * Bartlomiej Zolnierkiewicz : added some __init/__exit
*/


@@ -853,7 +854,7 @@
}


-static void pnp_mem_init(void)
+static void __init pnp_mem_init(void)
{
#include "iwmem.h"
#define CHUNK_SIZE (256*1024)
@@ -1022,7 +1023,7 @@
gus_write8(0x19, (gus_read8(0x19) | 0x01) & ~0x02);
}

-int gus_wave_detect(int baseaddr)
+int __init gus_wave_detect(int baseaddr)
{
unsigned long i, max_mem = 1024L;
unsigned long loc;
@@ -2901,7 +2902,7 @@
ioctl: gus_default_mixer_ioctl
};

-static int gus_default_mixer_init(void)
+static int __init gus_default_mixer_init(void)
{
int n;

@@ -2926,7 +2927,7 @@
return n;
}

-void gus_wave_init(struct address_info *hw_config)
+void __init gus_wave_init(struct address_info *hw_config)
{
unsigned long flags;
unsigned char val;
@@ -3167,7 +3168,7 @@
}
}

-void gus_wave_unload(struct address_info *hw_config)
+void __exit gus_wave_unload(struct address_info *hw_config)
{
#ifdef CONFIG_SOUND_GUSMAX
if (have_gus_max)
diff -uNr linux-240t11p2/drivers/sound/ics2101.c linux/drivers/sound/ics2101.c
--- linux-240t11p2/drivers/sound/ics2101.c Tue Oct 3 00:17:47 2000
+++ linux/drivers/sound/ics2101.c Fri Nov 10 21:28:51 2000
@@ -12,6 +12,7 @@
*
*
* Thomas Sailer : ioctl code reworked (vmalloc/vfree removed)
+ * Bartlomiej Zolnierkiewicz : added __init to ics2101_mixer_init()
*/
#include "sound_config.h"

@@ -212,8 +213,7 @@
ioctl: ics2101_mixer_ioctl
};

-int
-ics2101_mixer_init(void)
+int __init ics2101_mixer_init(void)
{
int i;
int n;
diff -uNr linux-240t11p2/drivers/sound/iwmem.h linux/drivers/sound/iwmem.h
--- linux-240t11p2/drivers/sound/iwmem.h Tue Sep 30 17:46:45 1997
+++ linux/drivers/sound/iwmem.h Fri Nov 10 21:48:54 2000
@@ -1,5 +1,5 @@
/*
- * sound/iwmem.c
+ * sound/iwmem.h
*
* DRAM size encoding table for AMD Interwave chip.
*/
@@ -9,12 +9,15 @@
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
+ *
+ * Changes:
+ * Bartlomiej Zolnierkiewicz : added __initdata to mem_decode
*/


#define K 1024
#define M (1024*K)
-static int mem_decode[][4] =
+static int mem_decode[][4] __initdata =
{
/* Bank0 Bank1 Bank2 Bank3 Encoding bits */
{256*K, 0, 0, 0}, /* 0 */
diff -uNr linux-240t11p2/drivers/sound/maestro.c linux/drivers/sound/maestro.c
--- linux-240t11p2/drivers/sound/maestro.c Tue Oct 3 00:18:26 2000
+++ linux/drivers/sound/maestro.c Fri Nov 10 21:32:25 2000
@@ -115,6 +115,8 @@
* themselves, but we'll see.
*
* History
+ * (still v0.14) Nov 10 2000 - Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+ * add __init to maestro_ac97_init() and maestro_install()
* (still based on v0.14) Mar 29 2000 - Zach Brown <zab@redhat.com>
* move to 2.3 power management interface, which
* required hacking some suspend/resume/check paths
@@ -812,7 +814,7 @@
* The PT101 setup is untested.
*/

-static u16 maestro_ac97_init(struct ess_card *card)
+static u16 __init maestro_ac97_init(struct ess_card *card)
{
u16 vend1, vend2, caps;

@@ -3290,7 +3292,7 @@
return card->power_regs ? 1 : 0;
}

-static int
+static int __init
maestro_install(struct pci_dev *pcidev, int card_type)
{
u32 n;
diff -uNr linux-240t11p2/drivers/sound/maui.c linux/drivers/sound/maui.c
--- linux-240t11p2/drivers/sound/maui.c Tue Oct 3 00:17:47 2000
+++ linux/drivers/sound/maui.c Fri Nov 10 21:33:02 2000
@@ -14,6 +14,8 @@
* Alan Cox General clean up, use kernel IRQ
* system
* Christoph Hellwig Adapted to module_init/module_exit
+ * Bartlomiej Zolnierkiewicz
+ * Added __init to download_code()
*
* Status:
* Andrew J. Kroll Tested 06/01/1999 with:
@@ -104,7 +106,7 @@
irq_ok = 1;
}

-static int download_code(void)
+static int __init download_code(void)
{
int i, lines = 0;
int eol_seen = 0, done = 0;
diff -uNr linux-240t11p2/drivers/sound/msnd.c linux/drivers/sound/msnd.c
--- linux-240t11p2/drivers/sound/msnd.c Tue Oct 3 00:16:14 2000
+++ linux/drivers/sound/msnd.c Fri Nov 10 19:34:42 2000
@@ -57,7 +57,7 @@
static multisound_dev_t *devs[MSND_MAX_DEVS];
static int num_devs;

-int msnd_register(multisound_dev_t *dev)
+int __init msnd_register(multisound_dev_t *dev)
{
int i;

diff -uNr linux-240t11p2/drivers/sound/msnd_pinnacle.c linux/drivers/sound/msnd_pinnacle.c
--- linux-240t11p2/drivers/sound/msnd_pinnacle.c Tue Oct 10 21:49:23 2000
+++ linux/drivers/sound/msnd_pinnacle.c Fri Nov 10 19:34:42 2000
@@ -1404,7 +1404,7 @@
}

#ifdef MODULE
-static void unload_multisound(void)
+static void __exit unload_multisound(void)
{
release_region(dev.io, dev.numio);
free_irq(dev.irq, &dev);
diff -uNr linux-240t11p2/drivers/sound/nm256_audio.c linux/drivers/sound/nm256_audio.c
--- linux-240t11p2/drivers/sound/nm256_audio.c Tue Oct 24 14:47:25 2000
+++ linux/drivers/sound/nm256_audio.c Fri Nov 10 21:51:26 2000
@@ -11,6 +11,10 @@
* This driver was written by someone who wishes to remain anonymous.
* It is in the public domain, so share and enjoy. Try to make a profit
* off of it; go on, I dare you.
+ *
+ * Changes:
+ * 11-10-2000 Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+ * Added some __init
*/

#define __NO_VERSION__
@@ -945,7 +949,7 @@


/* Installs the AC97 mixer into CARD. */
-static int
+static int __init
nm256_install_mixer (struct nm256_info *card)
{
int mixer;
@@ -989,7 +993,7 @@
* RAM.
*/

-static void
+static void __init
nm256_peek_for_sig (struct nm256_info *card)
{
u32 port1offset
@@ -1031,7 +1035,7 @@
* VERSTR is a human-readable version string.
*/

-static int
+static int __init
nm256_install(struct pci_dev *pcidev, enum nm256rev rev, char *verstr)
{
struct nm256_info *card;
@@ -1252,7 +1256,7 @@
* the sound cards are.
*/

-int
+int __init
init_nm256(void)
{
struct pci_dev *pcidev = NULL;
diff -uNr linux-240t11p2/drivers/sound/pas2_midi.c linux/drivers/sound/pas2_midi.c
--- linux-240t11p2/drivers/sound/pas2_midi.c Tue Oct 3 00:17:48 2000
+++ linux/drivers/sound/pas2_midi.c Fri Nov 10 21:52:23 2000
@@ -9,6 +9,8 @@
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
+ *
+ * Bartlomiej Zolnierkiewicz : Added __init to pas_init_mixer()
*/

#include "sound_config.h"
@@ -204,7 +206,7 @@
buffer_status: pas_buffer_status,
};

-void pas_midi_init(void)
+void __init pas_midi_init(void)
{
int dev = sound_alloc_mididev();

diff -uNr linux-240t11p2/drivers/sound/pas2_mixer.c linux/drivers/sound/pas2_mixer.c
--- linux-240t11p2/drivers/sound/pas2_mixer.c Tue Oct 3 00:17:48 2000
+++ linux/drivers/sound/pas2_mixer.c Fri Nov 10 21:53:09 2000
@@ -14,6 +14,7 @@
*/
/*
* Thomas Sailer : ioctl code reworked (vmalloc/vfree removed)
+ * Bartlomiej Zolnierkiewicz : added __init to pas_init_mixer()
*/
#include "sound_config.h"

@@ -315,7 +316,7 @@
ioctl: pas_mixer_ioctl
};

-int
+int __init
pas_init_mixer(void)
{
int d;
diff -uNr linux-240t11p2/drivers/sound/pas2_pcm.c linux/drivers/sound/pas2_pcm.c
--- linux-240t11p2/drivers/sound/pas2_pcm.c Tue Oct 3 00:17:48 2000
+++ linux/drivers/sound/pas2_pcm.c Fri Nov 10 21:36:16 2000
@@ -12,6 +12,7 @@
* Thomas Sailer : ioctl code reworked (vmalloc/vfree removed)
* Alan Cox : Swatted a double allocation of device bug. Made a few
* more things module options.
+ * Bartlomiej Zolnierkiewicz : Added __init to pas_pcm_init()
*/

#include "sound_config.h"
@@ -385,7 +386,7 @@
trigger: pas_audio_trigger
};

-void pas_pcm_init(struct address_info *hw_config)
+void __init pas_pcm_init(struct address_info *hw_config)
{
DEB(printk("pas2_pcm.c: long pas_pcm_init()\n"));

diff -uNr linux-240t11p2/drivers/sound/pss.c linux/drivers/sound/pss.c
--- linux-240t11p2/drivers/sound/pss.c Tue Oct 3 14:27:48 2000
+++ linux/drivers/sound/pss.c Fri Nov 10 21:37:51 2000
@@ -50,6 +50,8 @@
* setting is the previous hardcoded setting "/etc/sound/pss_synth".
* 00-03-03: Christoph Hellwig <chhellwig@gmx.net>
* Adapted to module_init/module_exit
+ * 11-10-2000: Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+ * Added __init to probe_pss(), attach_pss() and probe_pss_mpu()
*/


@@ -168,7 +170,7 @@
printk(KERN_WARNING "PSS: DSP Command (%04x) Timeout.\n", data);
}

-int probe_pss(struct address_info *hw_config)
+int __init probe_pss(struct address_info *hw_config)
{
unsigned short id;
int irq, dma;
@@ -644,7 +646,7 @@
}
}

-void attach_pss(struct address_info *hw_config)
+void __init attach_pss(struct address_info *hw_config)
{
unsigned short id;
char tmp[100];
@@ -693,7 +695,7 @@
conf_printf(tmp, hw_config);
}

-int probe_pss_mpu(struct address_info *hw_config)
+int __init probe_pss_mpu(struct address_info *hw_config)
{
int timeout;

diff -uNr linux-240t11p2/drivers/sound/sgalaxy.c linux/drivers/sound/sgalaxy.c
--- linux-240t11p2/drivers/sound/sgalaxy.c Tue Oct 3 00:17:49 2000
+++ linux/drivers/sound/sgalaxy.c Fri Nov 10 21:39:35 2000
@@ -16,6 +16,10 @@
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
+ *
+ * Changes:
+ * 11-10-2000 Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+ * Added __init to sb_rst() and sb_cmd()
*/

#include <linux/init.h>
@@ -40,7 +44,7 @@
#define SBDSP_STATUS SBDSP_COMMAND
#define SBDSP_DATA_AVAIL 0xE

-static int sb_rst(int base)
+static int __init sb_rst(int base)
{
int i;

@@ -62,7 +66,7 @@
return 1;
}

-static int sb_cmd( int base, unsigned char val )
+static int __init sb_cmd( int base, unsigned char val )
{
int i;

diff -uNr linux-240t11p2/drivers/sound/sscape.c linux/drivers/sound/sscape.c
--- linux-240t11p2/drivers/sound/sscape.c Tue Oct 3 00:17:50 2000
+++ linux/drivers/sound/sscape.c Fri Nov 10 21:40:34 2000
@@ -14,6 +14,7 @@
* Thomas Sailer : ioctl code reworked (vmalloc/vfree removed)
* Sergey Smitienko : ensoniq p'n'p support
* Christoph Hellwig : adapted to module_init/module_exit
+ * Bartlomiej Zolnierkiewicz : added __init to attach_sscape()
*/

#include <linux/init.h>
@@ -609,7 +610,7 @@
static int sscape_detected = 0;
static int sscape_is_pnp = 0;

-void attach_sscape(struct address_info *hw_config)
+void __init attach_sscape(struct address_info *hw_config)
{
#ifndef SSCAPE_REGS
/*
diff -uNr linux-240t11p2/drivers/sound/vwsnd.c linux/drivers/sound/vwsnd.c
--- linux-240t11p2/drivers/sound/vwsnd.c Tue Oct 3 14:27:49 2000
+++ linux/drivers/sound/vwsnd.c Fri Nov 10 21:43:25 2000
@@ -135,6 +135,10 @@
* For AFMT_S8, AFMT_MU_LAW and AFMT_A_LAW output, we have to XOR
* the 0x80 bit in software to compensate for Lithium's XOR.
* This happens in pcm_copy_{in,out}().
+ *
+ * Changes:
+ * 11-10-2000 Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+ * Added some __init/__exit
*/

#include <linux/module.h>
@@ -1330,7 +1334,7 @@
*
* return 0 on success, -errno on failure. */

-static int ad1843_init(lithium_t *lith)
+static int __init ad1843_init(lithium_t *lith)
{
unsigned long later;
int err;
@@ -3239,7 +3243,7 @@

/* driver probe routine. Return nonzero if hardware is found. */

-static int probe_vwsnd(struct address_info *hw_config)
+static int __init probe_vwsnd(struct address_info *hw_config)
{
lithium_t lith;
int w;
@@ -3291,7 +3295,7 @@
* Return +minor_dev on success, -errno on failure.
*/

-static int attach_vwsnd(struct address_info *hw_config)
+static int __init attach_vwsnd(struct address_info *hw_config)
{
vwsnd_dev_t *devc = NULL;
int err = -ENOMEM;
@@ -3417,7 +3421,7 @@
return err;
}

-static int unload_vwsnd(struct address_info *hw_config)
+static int __exit unload_vwsnd(struct address_info *hw_config)
{
vwsnd_dev_t *devc, **devcp;

@@ -3481,10 +3485,3 @@

module_init(init_vwsnd);
module_exit(cleanup_vwsnd);
-
-/*
- * Local variables:
- * compile-command: "cd ../..; make modules SUBDIRS=drivers/sound"
- * c-basic-offset: 8
- * End:
- */
diff -uNr linux-240t11p2/drivers/sound/waveartist.c linux/drivers/sound/waveartist.c
--- linux-240t11p2/drivers/sound/waveartist.c Tue Oct 10 21:49:23 2000
+++ linux/drivers/sound/waveartist.c Fri Nov 10 21:42:57 2000
@@ -17,6 +17,10 @@
* OSS/Free for Linux is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
* for more info.
+ *
+ * Changes:
+ * 11-10-2000 Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+ * Added __init to waveartist_init()
*/

/* Debugging */
@@ -1190,8 +1194,7 @@
ioctl: waveartist_mixer_ioctl
};

-static int
-waveartist_init(wavnc_info *devc)
+static int __init waveartist_init(wavnc_info *devc)
{
wavnc_port_info *portc;
char rev[3], dev_name[64];
diff -uNr linux-240t11p2/drivers/sound/wavfront.c linux/drivers/sound/wavfront.c
--- linux-240t11p2/drivers/sound/wavfront.c Tue Oct 3 00:17:50 2000
+++ linux/drivers/sound/wavfront.c Fri Nov 10 21:45:50 2000
@@ -60,7 +60,12 @@
*
* This program is distributed under the GNU GENERAL PUBLIC LICENSE (GPL)
* Version 2 (June 1991). See the "COPYING" file distributed with this software
- * for more info. */
+ * for more info.
+ *
+ * Changes:
+ * 11-10-2000 Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
+ * Added some __init and __initdata to entries in yss225.c
+ */

#include <linux/module.h>

@@ -2247,9 +2252,7 @@
restore_flags (flags);
}

-static int
-wavefront_hw_reset (void)
-
+static int __init wavefront_hw_reset (void)
{
int bits;
int hwv[2];
@@ -2703,8 +2706,7 @@
return 0;
}

-static int
-wavefront_do_reset (int atboot)
+static int __init wavefront_do_reset (int atboot)
{
char voices[1];

@@ -3076,7 +3078,7 @@
a somewhat "algorithmic" approach.
*/

-static int wffx_init (void)
+static int __init wffx_init (void)
{
int i;
int j;
diff -uNr linux-240t11p2/drivers/sound/ymf_sb.c linux/drivers/sound/ymf_sb.c
--- linux-240t11p2/drivers/sound/ymf_sb.c Tue Oct 3 14:27:49 2000
+++ linux/drivers/sound/ymf_sb.c Fri Nov 10 21:54:58 2000
@@ -43,6 +43,10 @@
Thu Sep 21 05:32:51 BRT 2000 0.0.5
* got rid of attach_uart401 and attach_sbmpu
Arnaldo Carvalho de Melo <acme@conectiva.com.br>
+
+ Fri Nov 10 21:24:11 CET 2000 0.0.6
+ * added some __init and __initdata to entries in 724hwmcode.h
+ Bartlomiej Zolnierkiewicz <bkz@linux-ide.org>
*/

#include <linux/module.h>
@@ -220,7 +224,7 @@

#define PFX "ymf_sb: "

-#define YMFSB_VERSION "0.0.5"
+#define YMFSB_VERSION "0.0.6"
#define YMFSB_CARD_NAME "YMF7xx Legacy Audio driver " YMFSB_VERSION

#ifdef SUPPORT_UART401_MIDI
@@ -338,7 +342,7 @@
return 0;
}

-static int checkCodec( struct pci_dev *pcidev )
+static int __init checkCodec( struct pci_dev *pcidev )
{
u8 tmp8;

@@ -357,7 +361,7 @@
return 0;
}

-static int setupLegacyIO( struct pci_dev *pcidev )
+static int __init setupLegacyIO( struct pci_dev *pcidev )
{
int v;
int sbio=0,mpuio=0,oplio=0,dma=0;
@@ -500,7 +504,7 @@
return;
}

-static int setupInstruction( struct pci_dev *pcidev )
+static int __init setupInstruction( struct pci_dev *pcidev )
{
int i;
int val;
diff -uNr linux-240t11p2/drivers/sound/yss225.c linux/drivers/sound/yss225.c
--- linux-240t11p2/drivers/sound/yss225.c Sat Jul 18 23:11:41 1998
+++ linux/drivers/sound/yss225.c Fri Nov 10 19:34:42 2000
@@ -1,4 +1,4 @@
-unsigned char page_zero[] = {
+unsigned char page_zero[] __initdata = {
0x01, 0x7c, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf5, 0x00,
0x11, 0x00, 0x20, 0x00, 0x32, 0x00, 0x40, 0x00, 0x13, 0x00, 0x00,
0x00, 0x14, 0x02, 0x76, 0x00, 0x60, 0x00, 0x80, 0x02, 0x00, 0x00,
@@ -25,7 +25,7 @@
0x1d, 0x02, 0xdf
};

-unsigned char page_one[] = {
+unsigned char page_one[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x19, 0x00,
0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0xd8, 0x00, 0x00,
0x02, 0x20, 0x00, 0x19, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x01,
@@ -52,7 +52,7 @@
0x60, 0x00, 0x1b
};

-unsigned char page_two[] = {
+unsigned char page_two[] __initdata = {
0xc4, 0x00, 0x44, 0x07, 0x44, 0x00, 0x40, 0x25, 0x01, 0x06, 0xc4,
0x07, 0x40, 0x25, 0x01, 0x00, 0x46, 0x46, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -67,7 +67,7 @@
0x46, 0x05, 0x46, 0x07, 0x46, 0x07, 0x44
};

-unsigned char page_three[] = {
+unsigned char page_three[] __initdata = {
0x07, 0x40, 0x00, 0x00, 0x00, 0x47, 0x00, 0x40, 0x00, 0x40, 0x06,
0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -82,7 +82,7 @@
0x02, 0x00, 0x42, 0x00, 0xc0, 0x00, 0x40
};

-unsigned char page_four[] = {
+unsigned char page_four[] __initdata = {
0x63, 0x03, 0x26, 0x02, 0x2c, 0x00, 0x24, 0x00, 0x2e, 0x02, 0x02,
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -97,7 +97,7 @@
0x02, 0x62, 0x02, 0x20, 0x01, 0x21, 0x01
};

-unsigned char page_six[] = {
+unsigned char page_six[] __initdata = {
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x06, 0x00,
0x00, 0x08, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x0e,
0x00, 0x00, 0x10, 0x00, 0x00, 0x12, 0x00, 0x00, 0x14, 0x00, 0x00,
@@ -118,7 +118,7 @@
0x80, 0x00, 0x7e, 0x80, 0x80
};

-unsigned char page_seven[] = {
+unsigned char page_seven[] __initdata = {
0x0f, 0xff, 0x00, 0x00, 0x08, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00,
0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00,
0x08, 0x00, 0x00, 0x00, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x0f,
@@ -145,7 +145,7 @@
0x00, 0x02, 0x00
};

-unsigned char page_zero_v2[] = {
+unsigned char page_zero_v2[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -157,7 +157,7 @@
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

-unsigned char page_one_v2[] = {
+unsigned char page_one_v2[] __initdata = {
0x01, 0xc0, 0x01, 0xfa, 0x00, 0x1a, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -169,21 +169,21 @@
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};

-unsigned char page_two_v2[] = {
+unsigned char page_two_v2[] __initdata = {
0x46, 0x46, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
-unsigned char page_three_v2[] = {
+unsigned char page_three_v2[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00
};
-unsigned char page_four_v2[] = {
+unsigned char page_four_v2[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -191,7 +191,7 @@
0x00, 0x00, 0x00, 0x00
};

-unsigned char page_seven_v2[] = {
+unsigned char page_seven_v2[] __initdata = {
0x0f, 0xff, 0x0f, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -202,7 +202,7 @@
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
};
-unsigned char mod_v2[] = {
+unsigned char mod_v2[] __initdata = {
0x01, 0x00, 0x02, 0x00, 0x01, 0x01, 0x02, 0x00, 0x01, 0x02, 0x02,
0x00, 0x01, 0x03, 0x02, 0x00, 0x01, 0x04, 0x02, 0x00, 0x01, 0x05,
0x02, 0x00, 0x01, 0x06, 0x02, 0x00, 0x01, 0x07, 0x02, 0x00, 0xb0,
@@ -232,7 +232,7 @@
0x02, 0x01, 0x01, 0x04, 0x02, 0x01, 0x01, 0x05, 0x02, 0x01, 0x01,
0x06, 0x02, 0x01, 0x01, 0x07, 0x02, 0x01
};
-unsigned char coefficients[] = {
+unsigned char coefficients[] __initdata = {
0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x00, 0x4b, 0x03,
0x11, 0x00, 0x4d, 0x01, 0x32, 0x07, 0x46, 0x00, 0x00, 0x07, 0x49,
0x00, 0x00, 0x07, 0x40, 0x00, 0x00, 0x07, 0x41, 0x00, 0x00, 0x01,
@@ -268,14 +268,14 @@
0x06, 0x6c, 0x4c, 0x6c, 0x06, 0x50, 0x52, 0xe2, 0x06, 0x42, 0x02,
0xba
};
-unsigned char coefficients2[] = {
+unsigned char coefficients2[] __initdata = {
0x07, 0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x45, 0x0f,
0xff, 0x07, 0x48, 0x0f, 0xff, 0x07, 0x7b, 0x04, 0xcc, 0x07, 0x7d,
0x04, 0xcc, 0x07, 0x7c, 0x00, 0x00, 0x07, 0x7e, 0x00, 0x00, 0x07,
0x46, 0x00, 0x00, 0x07, 0x49, 0x00, 0x00, 0x07, 0x47, 0x00, 0x00,
0x07, 0x4a, 0x00, 0x00, 0x07, 0x4c, 0x00, 0x00, 0x07, 0x4e, 0x00, 0x00
};
-unsigned char coefficients3[] = {
+unsigned char coefficients3[] __initdata = {
0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x28, 0x00, 0x51, 0x00,
0x51, 0x00, 0x7a, 0x00, 0x7a, 0x00, 0xa3, 0x00, 0xa3, 0x00, 0xcc,
0x00, 0xcc, 0x00, 0xf5, 0x00, 0xf5, 0x01, 0x1e, 0x01, 0x1e, 0x01,
\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.059 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site