1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00

- Remove conditions that are always true on 6.x and above

- Pet portlint(1) a little bit
This commit is contained in:
Rong-En Fan 2009-01-07 01:38:11 +00:00
parent 3e572f372c
commit 1b87f3e993
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=225366
2 changed files with 21 additions and 21 deletions

View File

@ -38,10 +38,10 @@ MAKE_ARGS= KMODDIR="${KMODDIR}"
# Make sure kernel sources are present before going any further
.if ! exists(${SRCPREFIX}/sys/dev/sound/pcm/sound.c)
IGNORE= "You need to extract kernel source tree before building this package"
IGNORE= you need to extract kernel source tree before building this package
.endif
pre-fetch:
pre-everything::
.for STRAY in ${STRAYFILES}
.if exists(${SRCPREFIX}/sys/dev/sound/pci/${STRAY})
@${ECHO}

View File

@ -1,6 +1,6 @@
--- au88x0.c.orig Fri May 10 04:32:55 2002
+++ au88x0.c Thu Apr 26 22:18:49 2007
@@ -29,10 +29,16 @@
--- au88x0.c.orig 2002-05-10 09:32:55.000000000 +0800
+++ au88x0.c 2009-01-06 17:05:04.000000000 +0800
@@ -29,18 +29,15 @@
*/
#include <dev/sound/pcm/sound.h>
@ -8,17 +8,22 @@
+#include "au88x0.h"
+#include <sys/systm.h>
+#if __FreeBSD_version < 500000
#include <pci/pcireg.h>
#include <pci/pcivar.h>
+#else
-#include <pci/pcireg.h>
-#include <pci/pcivar.h>
+#include <dev/pci/pcireg.h>
+#include <dev/pci/pcivar.h>
+#endif
#include <sys/queue.h>
SND_DECLARE_FILE("$FreeBSD$");
@@ -573,7 +579,11 @@
-#if __FreeBSD_version < 500033
-#error Cannot be compiled on older 5.0-CURRENT and 4.x systems
-#endif
-
#include "mixer_if.h"
MALLOC_DEFINE(M_PCMAUCORE, "PCMaucore", "Aureal Vortex 88x0 core");
@@ -573,7 +570,11 @@
ch->channel = c;
ch->buffer = b;
ch->run = 0;
@ -31,7 +36,7 @@
printf("sndbuf_alloc failed\n");
return NULL;
}
@@ -768,7 +778,7 @@
@@ -768,7 +769,7 @@
}
if (s) device_set_desc(dev, s);
@ -40,7 +45,7 @@
}
static int
@@ -802,7 +812,7 @@
@@ -802,7 +803,7 @@
data = pci_read_config(dev, PCIR_COMMAND, 2);
for (i = 0; i < 3; i++) {
@ -49,27 +54,22 @@
au->regtype[i] = SYS_RES_MEMORY;
au->reg[i] = bus_alloc_resource(dev, au->regtype[i], &au->regid[i], 0, ~0, 1, RF_ACTIVE);
if (!au->reg[i]) {
@@ -852,7 +862,11 @@
@@ -852,7 +853,9 @@
/*highaddr*/BUS_SPACE_MAXADDR,
/*filter*/NULL, /*filterarg*/NULL,
/*maxsize*/AU_BUFFSIZE, /*nsegments*/1, /*maxsegz*/0x3ffff,
- /*flags*/0, &au->parent_dmat) != 0) {
+ /*flags*/0,
+#if __FreeBSD_version > 501102
+ /*lockfunc*/NULL, /*lockarg*/NULL,
+#endif
+ &au->parent_dmat) != 0) {
device_printf(dev, "unable to create dma tag\n");
goto bad;
}
@@ -942,6 +956,10 @@
@@ -942,6 +945,6 @@
DRIVER_MODULE(snd_au88x0, pci, au_driver, pcm_devclass, 0, 0);
+#if __FreeBSD_version > 502124
-MODULE_DEPEND(snd_au88x0, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER);
+MODULE_DEPEND(snd_au88x0, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
+#else
MODULE_DEPEND(snd_au88x0, snd_pcm, PCM_MINVER, PCM_PREFVER, PCM_MAXVER);
+#endif
MODULE_VERSION(snd_au88x0, 1);