Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 5 Jun 2014 13:24:12 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r267108 - stable/8/sys/dev/sound/pci
Message-ID:  <201406051324.s55DOCOn062062@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Thu Jun  5 13:24:12 2014
New Revision: 267108
URL: http://svnweb.freebsd.org/changeset/base/267108

Log:
  MFC: r266793, r266799, r266808
  
  - Fix compilation with PAE support enabled by merging r233362 and, thus,
    doing away with the unnecessary uint8_t pointer casting.
    physical addresses.
  - Nuke the unused softc of emujoy(4).
  - Use DEVMETHOD_END.
  - Use NULL instead of 0 for pointers.
  
  Sponsored by:	Bally Wulff Games & Entertainment GmbH

Modified:
  stable/8/sys/dev/sound/pci/emu10k1.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/dev/   (props changed)
  stable/8/sys/dev/sound/   (props changed)
  stable/8/sys/dev/sound/pci/   (props changed)

Modified: stable/8/sys/dev/sound/pci/emu10k1.c
==============================================================================
--- stable/8/sys/dev/sound/pci/emu10k1.c	Thu Jun  5 13:08:08 2014	(r267107)
+++ stable/8/sys/dev/sound/pci/emu10k1.c	Thu Jun  5 13:24:12 2014	(r267108)
@@ -1378,7 +1378,7 @@ emu_memalloc(struct sc_info *sc, u_int32
 	ofs = 0;
 	for (idx = start; idx < start + blksz; idx++) {
 		mem->bmap[idx >> 3] |= 1 << (idx & 7);
-		tmp = (u_int32_t)(u_long)((u_int8_t *)blk->buf_addr + ofs);
+		tmp = (uint32_t)(blk->buf_addr + ofs);
 #ifdef EMUDEBUG
 		printf("pte[%d] -> %x phys, %x virt\n", idx, tmp,
 		    ((u_int32_t)buf) + ofs);
@@ -2186,7 +2186,7 @@ static device_method_t emu_methods[] = {
 	DEVMETHOD(device_attach,	emu_pci_attach),
 	DEVMETHOD(device_detach,	emu_pci_detach),
 
-	{ 0, 0 }
+	DEVMETHOD_END
 };
 
 static driver_t emu_driver = {
@@ -2195,7 +2195,7 @@ static driver_t emu_driver = {
 	PCM_SOFTC_SIZE,
 };
 
-DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, 0, 0);
+DRIVER_MODULE(snd_emu10k1, pci, emu_driver, pcm_devclass, NULL, NULL);
 MODULE_DEPEND(snd_emu10k1, sound, SOUND_MINVER, SOUND_PREFVER, SOUND_MAXVER);
 MODULE_VERSION(snd_emu10k1, 1);
 MODULE_DEPEND(snd_emu10k1, midi, 1, 1, 1);
@@ -2224,12 +2224,14 @@ emujoy_pci_probe(device_t dev)
 static int
 emujoy_pci_attach(device_t dev)
 {
+
 	return 0;
 }
 
 static int
 emujoy_pci_detach(device_t dev)
 {
+
 	return 0;
 }
 
@@ -2238,16 +2240,15 @@ static device_method_t emujoy_methods[] 
 	DEVMETHOD(device_attach,	emujoy_pci_attach),
 	DEVMETHOD(device_detach,	emujoy_pci_detach),
 
-	{ 0, 0 }
+	DEVMETHOD_END
 };
 
 static driver_t emujoy_driver = {
 	"emujoy",
 	emujoy_methods,
-	8,
+	1	/* no softc */
 };
 
 static devclass_t emujoy_devclass;
 
-DRIVER_MODULE(emujoy, pci, emujoy_driver, emujoy_devclass, 0, 0);
-
+DRIVER_MODULE(emujoy, pci, emujoy_driver, emujoy_devclass, NULL, NULL);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201406051324.s55DOCOn062062>