Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 2 Jul 2012 07:39:55 +0000 (UTC)
From:      Gleb Smirnoff <glebius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r237975 - head/sys/dev/sound/pci
Message-ID:  <201207020739.q627dtMm055582@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: glebius
Date: Mon Jul  2 07:39:55 2012
New Revision: 237975
URL: http://svn.freebsd.org/changeset/base/237975

Log:
  - Call bus_generic_attach() at end of hdspe_attach().
  - Use own devclass_t in DRIVER_MODULE().
  
  This fixes operation of hdspe(4) when built as loadable module.
  
  Submitted by:	Ruslan Bukin <br bsdpad.com>

Modified:
  head/sys/dev/sound/pci/hdspe.c

Modified: head/sys/dev/sound/pci/hdspe.c
==============================================================================
--- head/sys/dev/sound/pci/hdspe.c	Mon Jul  2 07:39:33 2012	(r237974)
+++ head/sys/dev/sound/pci/hdspe.c	Mon Jul  2 07:39:55 2012	(r237975)
@@ -347,7 +347,7 @@ hdspe_attach(device_t dev)
 
 	hdspe_map_dmabuf(sc);
 
-	return 0;
+	return (bus_generic_attach(dev));
 }
 
 static void
@@ -407,4 +407,6 @@ static driver_t hdspe_driver = {
 	PCM_SOFTC_SIZE,
 };
 
-DRIVER_MODULE(snd_hdspe, pci, hdspe_driver, pcm_devclass, 0, 0);
+static devclass_t hdspe_devclass;
+
+DRIVER_MODULE(snd_hdspe, pci, hdspe_driver, hdspe_devclass, 0, 0);



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