Skip to contentSkip to conversation

ALSA: remove #if'd kernel 2.2 code

PATCH In review Adrian Bunk 3 participants 5 messages Jan 17, 2003 – Jan 21, 2003

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ALSA: remove #if'd kernel 2.2 code

Hi Jaroslav,

the patch below removes #if'd code for kernel 2.2 (and in one place for kernel < 2.4.18) from ALSA.

I've tested the compilation with 2.5.59.

Please apply
Adrian

sound/pci/trident/trident_main.c renamed from sound/pci/trident/trident_main.c.old +0 -10
@@ -40,9 +40,7 @@
 #include <sound/control.h>
 #include <sound/trident.h>
 #include <sound/asoundef.h>
-#ifndef LINUX_2_2
 #include <linux/gameport.h>
-#endif
 
 #include <asm/io.h>
 
@@ -2987,7 +2985,6 @@
 /*
  * gameport interface
  */
-#ifndef LINUX_2_2
 
 typedef struct snd_trident_gameport {
 	struct gameport info;
@@ -3072,11 +3069,6 @@
 	gameport_register_port(&gp->info);
 }
 
-#else
-void __devinit snd_trident_gameport(trident_t *chip)
-{
-}
-#endif
 
 /*
  *  SiS reset routine
@@ -3482,12 +3474,10 @@
 
 int snd_trident_free(trident_t *trident)
 {
-#ifndef LINUX_2_2
 	if (trident->gameport) {
 		gameport_unregister_port(&trident->gameport->info);
 		kfree(trident->gameport);
 	}
-#endif
 	snd_trident_disable_eso(trident);
 	// Disable S/PDIF out
 	if (trident->device == TRIDENT_DEVICE_ID_NX)
sound/pci/cs46xx/cs46xx_lib.c renamed from sound/pci/cs46xx/cs46xx_lib.c.old +0 -13
@@ -57,9 +57,7 @@
 #include <sound/control.h>
 #include <sound/info.h>
 #include <sound/cs46xx.h>
-#ifndef LINUX_2_2
 #include <linux/gameport.h>
-#endif
 
 #include <asm/io.h>
 
@@ -2740,7 +2738,6 @@
  * gameport interface
  */
 
-#ifndef LINUX_2_2
 
 typedef struct snd_cs46xx_gameport {
 	struct gameport info;
@@ -2824,14 +2821,6 @@
 	gameport_register_port(&gp->info);
 }
 
-#else /* LINUX_2_2 */
-
-void __devinit snd_cs46xx_gameport(cs46xx_t *chip)
-{
-}
-
-#endif /* !LINUX_2_2 */
-
 /*
  *  proc interface
  */
@@ -2972,12 +2961,10 @@
 	if (chip->active_ctrl)
 		chip->active_ctrl(chip, 1);
 
-#ifndef LINUX_2_2
 	if (chip->gameport) {
 		gameport_unregister_port(&chip->gameport->info);
 		kfree(chip->gameport);
 	}
-#endif
 #ifdef CONFIG_PM
 	if (chip->pm_dev)
 		pm_unregister(chip->pm_dev);
sound/pci/maestro3.c renamed from sound/pci/maestro3.c.old +0 -5
@@ -2548,13 +2548,8 @@
 	chip->pci = pci;
 	chip->irq = -1;
 
-#ifndef LINUX_2_2
 	subsystem_vendor = pci->subsystem_vendor;
 	subsystem_device = pci->subsystem_device;
-#else
-	pci_read_config_word(pci, PCI_SUBSYSTEM_VENDOR_ID, &subsystem_vendor);
-	pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &subsystem_device);
-#endif
 	for (quirk = m3_quirk_list; quirk->vendor; quirk++) {
 		if (subsystem_vendor == quirk->vendor &&
 		    subsystem_device == quirk->device) {
sound/pci/es1938.c renamed from sound/pci/es1938.c.old +0 -8
@@ -59,9 +59,7 @@
 #include <sound/mpu401.h>
 #define SNDRV_GET_ID
 #include <sound/initval.h>
-#ifndef LINUX_2_2
 #include <linux/gameport.h>
-#endif
 
 #include <asm/io.h>
 
@@ -248,9 +246,7 @@
 	spinlock_t mixer_lock;
         snd_info_entry_t *proc_entry;
 
-#ifndef LINUX_2_2
 	struct gameport gameport;
-#endif
 };
 
 static void snd_es1938_interrupt(int irq, void *dev_id, struct pt_regs *regs);
@@ -1328,10 +1324,8 @@
 
 static int snd_es1938_free(es1938_t *chip)
 {
-#ifndef LINUX_2_2
 	if (chip->gameport.io)
 		gameport_unregister_port(&chip->gameport);
-#endif
 	if (chip->res_io_port) {
 		release_resource(chip->res_io_port);
 		kfree_nocheck(chip->res_io_port);
@@ -1645,10 +1639,8 @@
 				chip->mpu_port, 1, chip->irq, 0, &chip->rmidi) < 0) {
 		printk(KERN_ERR "es1938: unable to initialize MPU-401\n");
 	}
-#ifndef LINUX_2_2
 	chip->gameport.io = chip->game_port;
 	gameport_register_port(&chip->gameport);
-#endif
 
 	strcpy(card->driver, "ES1938");
 	strcpy(card->shortname, "ESS ES1938 (Solo-1)");
sound/pci/sonicvibes.c renamed from sound/pci/sonicvibes.c.old +0 -8
@@ -37,9 +37,7 @@
 #include <sound/opl3.h>
 #define SNDRV_GET_ID
 #include <sound/initval.h>
-#ifndef LINUX_2_2
 #include <linux/gameport.h>
-#endif
 
 #include <asm/io.h>
 
@@ -257,9 +255,7 @@
 	snd_kcontrol_t *master_mute;
 	snd_kcontrol_t *master_volume;
 
-#ifndef LINUX_2_2
 	struct gameport gameport;
-#endif
 };
 
 static struct pci_device_id snd_sonic_ids[] __devinitdata = {
@@ -1208,10 +1204,8 @@
 
 static int snd_sonicvibes_free(sonicvibes_t *sonic)
 {
-#ifndef LINUX_2_2
 	if (sonic->gameport.io)
 		gameport_unregister_port(&sonic->gameport);
-#endif
 	snd_sonicvibes_proc_done(sonic);
 	pci_write_config_dword(sonic->pci, 0x40, sonic->dmaa_port);
 	pci_write_config_dword(sonic->pci, 0x48, sonic->dmac_port);
@@ -1512,10 +1506,8 @@
 		snd_card_free(card);
 		return err;
 	}
-#ifndef LINUX_2_2
 	sonic->gameport.io = sonic->game_port;
 	gameport_register_port(&sonic->gameport);
-#endif
 	strcpy(card->driver, "SonicVibes");
 	strcpy(card->shortname, "S3 SonicVibes");
 	sprintf(card->longname, "%s rev %i at 0x%lx, irq %i",
sound/pci/cs4281.c renamed from sound/pci/cs4281.c.old +0 -9
@@ -35,9 +35,7 @@
 #define SNDRV_GET_ID
 #include <sound/initval.h>
 
-#ifndef LINUX_2_2
 #include <linux/gameport.h>
-#endif
 
 MODULE_AUTHOR("Jaroslav Kysela <[email protected]>");
 MODULE_DESCRIPTION("Cirrus Logic CS4281");
@@ -1309,7 +1307,6 @@
  * joystick support
  */
 
-#ifndef LINUX_2_2
 
 typedef struct snd_cs4281_gameport {
 	struct gameport info;
@@ -1399,8 +1396,6 @@
 	gameport_register_port(&gp->info);
 }
 
-#endif /* !LINUX_2_2 */
-
 
 /*
 
@@ -1408,12 +1403,10 @@
 
 static int snd_cs4281_free(cs4281_t *chip)
 {
-#ifndef LINUX_2_2
 	if (chip->gameport) {
 		gameport_unregister_port(&chip->gameport->info);
 		kfree(chip->gameport);
 	}
-#endif
 	snd_cs4281_proc_done(chip);
 	if (chip->irq >= 0)
 		synchronize_irq(chip->irq);
@@ -2041,9 +2034,7 @@
 		snd_card_free(card);
 		return err;
 	}
-#ifndef LINUX_2_2
 	snd_cs4281_gameport(chip);
-#endif
 	strcpy(card->driver, "CS4281");
 	strcpy(card->shortname, "Cirrus Logic CS4281");
 	sprintf(card->longname, "%s at 0x%lx, irq %d",
sound/core/seq/oss/seq_oss_init.c renamed from sound/core/seq/oss/seq_oss_init.c.old +0 -6
@@ -275,9 +275,6 @@
 
 	client_table[dp->index] = dp;
 	num_clients++;
-#ifdef LINUX_2_2
-	MOD_INC_USE_COUNT;
-#endif
 
 	debug_printk(("open done\n"));
 
@@ -434,9 +431,6 @@
 	if (dp->queue >= 0)
 		delete_seq_queue(dp);
 
-#ifdef LINUX_2_2
-	MOD_DEC_USE_COUNT;
-#endif
 	debug_printk(("release done\n"));
 }
 
sound/core/seq/oss/seq_oss.c renamed from sound/core/seq/oss/seq_oss.c.old +0 -2
@@ -194,9 +194,7 @@
 
 static struct file_operations seq_oss_f_ops =
 {
-#ifndef LINUX_2_2
 	.owner =	THIS_MODULE,
-#endif
 	.read =		odev_read,
 	.write =	odev_write,
 	.open =		odev_open,
sound/core/seq/seq_clientmgr.c renamed from sound/core/seq/seq_clientmgr.c.old +0 -9
@@ -339,10 +339,6 @@
 	/* make others aware this new client */
 	snd_seq_system_client_ev_client_start(c);
 
-#ifdef LINUX_2_2
-	MOD_INC_USE_COUNT;
-#endif
-
 	return 0;
 }
 
@@ -358,9 +354,6 @@
 		kfree(client);
 	}
 
-#ifdef LINUX_2_2
-	MOD_DEC_USE_COUNT;
-#endif
 	return 0;
 }
 
@@ -2467,9 +2460,7 @@
 
 static struct file_operations snd_seq_f_ops =
 {
-#ifndef LINUX_2_2
 	.owner =	THIS_MODULE,
-#endif
 	.read =		snd_seq_read,
 	.write =	snd_seq_write,
 	.open =		snd_seq_open,
sound/core/hwdep.c renamed from sound/core/hwdep.c.old +0 -2
@@ -237,9 +237,7 @@
 
 static struct file_operations snd_hwdep_f_ops =
 {
-#ifndef LINUX_2_2
 	.owner = 	THIS_MODULE,
-#endif
 	.llseek =	snd_hwdep_llseek,
 	.read = 	snd_hwdep_read,
 	.write =	snd_hwdep_write,
sound/core/oss/mixer_oss.c renamed from sound/core/oss/mixer_oss.c.old +0 -11
@@ -56,14 +56,8 @@
 	fmixer->card = card;
 	fmixer->mixer = card->mixer_oss;
 	file->private_data = fmixer;
-#ifdef LINUX_2_2
-	MOD_INC_USE_COUNT;
-#endif
 	if (!try_module_get(card->module)) {
 		kfree(fmixer);
-#ifdef LINUX_2_2
-		MOD_DEC_USE_COUNT;
-#endif
 		snd_card_file_remove(card, file);
 		return -EFAULT;
 	}
@@ -77,9 +71,6 @@
 	if (file->private_data) {
 		fmixer = (snd_mixer_oss_file_t *) file->private_data;
 		module_put(fmixer->card->module);
-#ifdef LINUX_2_2
-		MOD_DEC_USE_COUNT;
-#endif
 		snd_card_file_remove(fmixer->card, file);
 		kfree(fmixer);
 	}
@@ -384,9 +375,7 @@
 
 static struct file_operations snd_mixer_oss_f_ops =
 {
-#ifndef LINUX_2_2
 	.owner =	THIS_MODULE,
-#endif
 	.open =		snd_mixer_oss_open,
 	.release =	snd_mixer_oss_release,
 	.ioctl =	snd_mixer_oss_ioctl,
sound/core/oss/pcm_oss.c renamed from sound/core/oss/pcm_oss.c.old +0 -15
@@ -1540,9 +1540,6 @@
 	device = SNDRV_MINOR_OSS_DEVICE(minor) == SNDRV_MINOR_OSS_PCM1 ?
 		adsp_map[cardnum] : dsp_map[cardnum];
 
-#ifdef LINUX_2_2
-	MOD_INC_USE_COUNT;
-#endif
 	pcm = snd_pcm_devices[(cardnum * SNDRV_PCM_DEVICES) + device];
 	if (pcm == NULL) {
 		err = -ENODEV;
@@ -1615,9 +1612,6 @@
       __error2:
       	snd_card_file_remove(pcm->card, file);
       __error1:
-#ifdef LINUX_2_2
-	MOD_DEC_USE_COUNT;
-#endif
 	return err;
 }
 
@@ -1640,9 +1634,6 @@
 	wake_up(&pcm->open_wait);
 	module_put(pcm->card->module);
 	snd_card_file_remove(pcm->card, file);
-#ifdef LINUX_2_2
-	MOD_DEC_USE_COUNT;
-#endif
 	return 0;
 }
 
@@ -1924,11 +1915,7 @@
 	if (runtime->oss.plugin_first != NULL)
 		return -EIO;
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 3, 25)
 	if (area->vm_pgoff != 0)
-#else
-	if (area->vm_offset != 0)
-#endif
 		return -EINVAL;
 
 	err = snd_pcm_mmap_data(substream, file, area);
@@ -2091,9 +2078,7 @@
 
 static struct file_operations snd_pcm_oss_f_reg =
 {
-#ifndef LINUX_2_2
 	.owner =	THIS_MODULE,
-#endif
 	.read =		snd_pcm_oss_read,
 	.write =	snd_pcm_oss_write,
 	.open =		snd_pcm_oss_open,
sound/core/rawmidi.c renamed from sound/core/rawmidi.c.old +0 -11
@@ -181,9 +181,6 @@
 
 	if (rfile)
 		rfile->input = rfile->output = NULL;
-#ifdef LINUX_2_2
-	MOD_INC_USE_COUNT;
-#endif
 	rmidi = snd_rawmidi_devices[(cardnum * SNDRV_RAWMIDI_DEVICES) + device];
 	if (rmidi == NULL) {
 		err = -ENODEV;
@@ -342,9 +339,6 @@
 	module_put(rmidi->card->module);
 	up(&rmidi->open_mutex);
       __error1:
-#ifdef LINUX_2_2
-	MOD_DEC_USE_COUNT;
-#endif
 	return err;
 }
 
@@ -499,9 +493,6 @@
 	}
 	up(&rmidi->open_mutex);
 	module_put(rmidi->card->module);
-#ifdef LINUX_2_2
-	MOD_DEC_USE_COUNT;
-#endif
 	return 0;
 }
 
@@ -1273,9 +1264,7 @@
 
 static struct file_operations snd_rawmidi_f_ops =
 {
-#ifndef LINUX_2_2
 	.owner =	THIS_MODULE,
-#endif
 	.read =		snd_rawmidi_read,
 	.write =	snd_rawmidi_write,
 	.open =		snd_rawmidi_open,
sound/core/control.c renamed from sound/core/control.c.old +0 -11
@@ -48,9 +48,6 @@
 	snd_ctl_file_t *ctl;
 	int err;
 
-#ifdef LINUX_2_2
-	MOD_INC_USE_COUNT;
-#endif
 	card = snd_cards[cardnum];
 	if (!card) {
 		err = -ENODEV;
@@ -86,9 +83,6 @@
       __error2:
 	snd_card_file_remove(card, file);
       __error1:
-#ifdef LINUX_2_2
-      	MOD_DEC_USE_COUNT;
-#endif
       	return err;
 }
 
@@ -131,9 +125,6 @@
 	snd_magic_kfree(ctl);
 	module_put(card->module);
 	snd_card_file_remove(card, file);
-#ifdef LINUX_2_2
-	MOD_DEC_USE_COUNT;
-#endif
 	return 0;
 }
 
@@ -789,9 +780,7 @@
 
 static struct file_operations snd_ctl_f_ops =
 {
-#ifndef LINUX_2_2
 	.owner =	THIS_MODULE,
-#endif
 	.read =		snd_ctl_read,
 	.open =		snd_ctl_open,
 	.release =	snd_ctl_release,
sound/core/init.c renamed from sound/core/init.c.old +0 -2
@@ -181,9 +181,7 @@
 		f_ops = &s_f_ops->f_ops;
 
 		memset(f_ops, 0, sizeof(*f_ops));
-#ifndef LINUX_2_2
 		f_ops->owner = file->f_op->owner;
-#endif
 		f_ops->release = file->f_op->release;
 		f_ops->poll = snd_disconnect_poll;
 
sound/core/pcm_native.c renamed from sound/core/pcm_native.c.old +0 -83

238 lines not on this page · raw message

sound/core/timer.c renamed from sound/core/timer.c.old +0 -8
@@ -942,9 +942,6 @@
 		return -ENOMEM;
 	}
 	file->private_data = tu;
-#ifdef LINUX_2_2
-	MOD_INC_USE_COUNT;
-#endif
 	return 0;
 }
 
@@ -961,9 +958,6 @@
 			kfree(tu->queue);
 		snd_magic_kfree(tu);
 	}
-#ifdef LINUX_2_2
-	MOD_DEC_USE_COUNT;
-#endif
 	return 0;
 }
 
@@ -1324,9 +1318,7 @@
 
 static struct file_operations snd_timer_f_ops =
 {
-#ifndef LINUX_2_2
 	.owner =	THIS_MODULE,
-#endif
 	.read =		snd_timer_user_read,
 	.open =		snd_timer_user_open,
 	.release =	snd_timer_user_release,
sound/core/sound.c renamed from sound/core/sound.c.old +0 -12
@@ -155,9 +155,7 @@
 
 struct file_operations snd_fops =
 {
-#ifndef LINUX_2_2
 	.owner =	THIS_MODULE,
-#endif
 	.open =		snd_open
 };
 
@@ -312,12 +310,8 @@
 		return err;
 #endif
 #ifdef CONFIG_DEVFS_FS
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
-	devfs_handle = devfs_mk_dir(NULL, "snd", 3, NULL);
-#else
 	devfs_handle = devfs_mk_dir(NULL, "snd", NULL);
 #endif
-#endif
 	if (register_chrdev(major, "alsa", &snd_fops)) {
 		snd_printk(KERN_ERR "unable to register native major device number %d\n", major);
 		return -EIO;
@@ -345,9 +339,6 @@
 #ifndef MODULE
 	printk(KERN_INFO "Advanced Linux Sound Architecture Driver Version " CONFIG_SND_VERSION CONFIG_SND_DATE ".\n");
 #endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) && defined(CONFIG_APM)
-	pm_init();
-#endif
 	return 0;
 }
 
@@ -362,9 +353,6 @@
 	snd_info_minor_unregister();
 #endif
 	snd_info_done();
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) && defined(CONFIG_APM)
-	pm_done();
-#endif
 #ifdef CONFIG_SND_DEBUG_MEMORY
 	snd_memory_done();
 #endif
sound/core/info.c renamed from sound/core/info.c.old +0 -119

212 lines not on this page · raw message

sound/core/seq/seq_memory.c renamed from sound/core/seq/seq_memory.c.old +0 -11
@@ -235,18 +235,7 @@
 	while (pool->free == NULL && ! nonblock && ! pool->closing) {
 
 		spin_unlock(&pool->lock);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
-		/* change semaphore to allow other clients
-		   to access device file */
-		if (file)
-			up(&semaphore_of(file));
-#endif
 		interruptible_sleep_on(&pool->output_sleep);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 3, 0)
-		/* restore semaphore again */
-		if (file)
-			down(&semaphore_of(file));
-#endif
 		spin_lock(&pool->lock);
 		/* interrupted? */
 		if (signal_pending(current)) {
sound/core/wrappers.c renamed from sound/core/wrappers.c.old +0 -2
@@ -51,7 +51,6 @@
 
 
 /* check the condition in <sound/core.h> !! */
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
 #if defined(__i386__) || defined(__ppc__) || defined(__x86_64__)
 
 #include <linux/pci.h>
@@ -104,4 +103,3 @@
 }
 
 #endif
-#endif
sound/core/rtctimer.c renamed from sound/core/rtctimer.c.old +0 -4
@@ -31,11 +31,7 @@
 
 #if defined(CONFIG_RTC) || defined(CONFIG_RTC_MODULE)
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 2, 12)	/* FIXME: which 2.2.x kernel? */
-#include <linux/rtc.h>
-#else
 #include <linux/mc146818rtc.h>
-#endif
 
 /* use tasklet for interrupt handling */
 #define USE_TASKLET
sound/pci/rme9652/hammerfall_mem.c renamed from sound/pci/rme9652/hammerfall_mem.c.old +0 -20
@@ -98,15 +98,7 @@
 {
 	void *res;
 
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 3, 0)
 	res = (void *) pci_alloc_consistent(pci, size, dmaaddr);
-#else
-	int pg;
-	for (pg = 0; PAGE_SIZE * (1 << pg) < size; pg++);
-	res = (void *)__get_free_pages(GFP_KERNEL, pg);
-	if (res != NULL)
-		*dmaaddr = virt_to_bus(res);
-#endif
 	if (res != NULL) {
 		struct page *page = virt_to_page(res);
 		struct page *last_page = page + (size + PAGE_SIZE - 1) / PAGE_SIZE;
@@ -127,19 +119,7 @@
 	last_page = virt_to_page(ptr) + (size + PAGE_SIZE - 1) / PAGE_SIZE;
 	while (page < last_page)
 		clear_bit(PG_reserved, &(page++)->flags);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 3, 0)
 	pci_free_consistent(pci, size, ptr, dmaaddr);
-#else
-	{
-		int pg;
-		for (pg = 0; PAGE_SIZE * (1 << pg) < size; pg++);
-		if (bus_to_virt(dmaaddr) != ptr) {
-			printk(KERN_ERR "hammerfall_free_pages: dmaaddr != ptr\n");
-			return;
-		}
-		free_pages((unsigned long)ptr, pg);
-	}
-#endif
 }
 
 void *snd_hammerfall_get_buffer (struct pci_dev *pcidev, dma_addr_t *dmaaddr)
sound/ppc/awacs.c renamed from sound/ppc/awacs.c.old +2 -8
@@ -32,7 +32,7 @@
 #define chip_t pmac_t
 
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0) || defined(CONFIG_ADB_CUDA)
+#ifdef CONFIG_ADB_CUDA
 #define PMAC_AMP_AVAIL
 #endif
 
@@ -43,12 +43,6 @@
 	unsigned char amp_tone[2];
 } awacs_amp_t;
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
-#define CHECK_CUDA_AMP() (adb_hardware == ADB_VIACUDA)
-#else
-#define CHECK_CUDA_AMP() (sys_ctrler == SYS_CTRLER_CUDA)
-#endif
-
 #endif /* PMAC_AMP_AVAIL */
 
 
@@ -752,7 +746,7 @@
 
 	chip->revision = (in_le32(&chip->awacs->codec_stat) >> 12) & 0xf;
 #ifdef PMAC_AMP_AVAIL
-	if (chip->revision == 3 && chip->has_iic && CHECK_CUDA_AMP()) {
+	if (chip->revision == 3 && chip->has_iic && sys_ctrler == SYS_CTRLER_CUDA) {
 		awacs_amp_t *amp = kmalloc(sizeof(*amp), GFP_KERNEL);
 		if (! amp)
 			return -ENOMEM;
sound/ppc/pmac.h renamed from sound/ppc/pmac.h.old +0 -6
@@ -26,11 +26,6 @@
 #include <sound/pcm.h>
 #include "awacs.h"
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
-#include <asm/adb.h>
-#include <asm/cuda.h>
-#include <asm/pmu.h>
-#else /* 2.4.0 kernel */
 #include <linux/adb.h>
 #ifdef CONFIG_ADB_CUDA
 #include <linux/cuda.h>
@@ -38,7 +33,6 @@
 #ifdef CONFIG_ADB_PMU
 #include <linux/pmu.h>
 #endif
-#endif
 #include <linux/nvram.h>
 #include <linux/tty.h>
 #include <linux/vt_kern.h>
sound/ppc/pmac.c renamed from sound/ppc/pmac.c.old +0 -10
@@ -35,16 +35,6 @@
 #include <asm/feature.h>
 #endif
 
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,0)
-#define pmu_suspend()	/**/
-#define pmu_resume()	/**/
-#endif
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18)
-#define request_OF_resource(io,num,str)  1
-#define release_OF_resource(io,num) /**/
-#endif
-
 
 #define chip_t pmac_t
 
include/sound/driver.h renamed from include/sound/driver.h.old +0 -2
@@ -49,7 +49,6 @@
  *  ==========================================================================
  */
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 4, 0)
 #if defined(__i386__) || defined(__ppc__) || defined(__x86_64__)
 /*
  * Here a dirty hack for 2.4 kernels.. See sound/core/memory.c.
@@ -61,7 +60,6 @@
 #undef pci_alloc_consistent
 #define pci_alloc_consistent snd_pci_hack_alloc_consistent
 #endif /* i386 or ppc */
-#endif /* 2.4.0 */
 
 #ifdef CONFIG_SND_DEBUG_MEMORY
 #include <linux/slab.h>
#1 lore raw
Quoted 8 lines · Adrian Bunk

Hi Jaroslav,

the patch below removes #if'd code for kernel 2.2 (and in one place for kernel < 2.4.18) from ALSA.

I've tested the compilation with 2.5.59.

Please apply

Nice patch, but we turn in the maintaince nightmare, because our CVS tree contains shared sources among all kernels. I'll give a look what I can do to remove this code.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This SF.NET email is sponsored by: Thawte.com - A 128-bit supercerts will allow you to extend the highest allowed 128 bit encryption to all your clients even if they use browsers that are limited to 40 bit encryption. Get a guide here:http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0030en

#2 lore raw

At Sat, 18 Jan 2003 21:32:50 +0100 (CET),

Quoted 8 lines · Jaroslav
Quoted 5 lines · Adrian Bunk

Hi Jaroslav,

the patch below removes #if'd code for kernel 2.2 (and in one place for kernel < 2.4.18) from ALSA.

Quoted 7 lines
Quoted 3 lines

I've tested the compilation with 2.5.59.

Please apply

Nice patch, but we turn in the maintaince nightmare, because our CVS tree contains shared sources among all kernels. I'll give a look what I can do to remove this code.

many of them had been already done on the cvs.
i'll check them now, too.

Jaroslav, could you sync with 2.5 tree and submit the patches to Linus (even before pnp-merge)? otherwise we'll have again a mega-giga patchset :)

Takashi

-------------------------------------------------------
This SF.NET email is sponsored by: FREE SSL Guide from Thawte are you planning your Web Server Security? Click here to get a FREE Thawte SSL guide and find the answers to all your SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en

#3 lore raw
Quoted 2 lines · Takashi Iwai

Jaroslav, could you sync with 2.5 tree and submit the patches to Linus (even before pnp-merge)? otherwise we'll have again a mega-giga

I'm doing pnp changes in separate bk tree.

Quoted 1 line

patchset :)

I'll try do what I can. (un)fortunately, a great life event for me occured on Sunday - our first baby (son) was born, so I was busy with private things last two days.

Jaroslav

-----
Jaroslav Kysela <[email protected]>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs

-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

#4 lore raw

Congratulations!

At Tue, 21 Jan 2003 12:11:32 +0100 (CET),

Quoted 6 lines · Jaroslav
Quoted 2 lines · Takashi Iwai

Jaroslav, could you sync with 2.5 tree and submit the patches to Linus (even before pnp-merge)? otherwise we'll have again a mega-giga

Quoted 7 lines

I'm doing pnp changes in separate bk tree.

Quoted 1 line

patchset :)

I'll try do what I can. (un)fortunately, a great life event for me occured on Sunday - our first baby (son) was born, so I was busy with private things last two days.

Takashi

-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com