Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 1 Apr 2014 04:40:09 +0000 (UTC)
From:      Ruslan Bukin <br@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r263981 - head/sys/arm/samsung/exynos
Message-ID:  <201404010440.s314e9Da073354@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: br
Date: Tue Apr  1 04:40:08 2014
New Revision: 263981
URL: http://svnweb.freebsd.org/changeset/base/263981

Log:
  Release i2c bus on detach.

Modified:
  head/sys/arm/samsung/exynos/chrome_ec.c

Modified: head/sys/arm/samsung/exynos/chrome_ec.c
==============================================================================
--- head/sys/arm/samsung/exynos/chrome_ec.c	Tue Apr  1 00:19:13 2014	(r263980)
+++ head/sys/arm/samsung/exynos/chrome_ec.c	Tue Apr  1 04:40:08 2014	(r263981)
@@ -234,9 +234,22 @@ ec_attach(device_t dev)
 	return (0);
 }
 
+static int
+ec_detach(device_t dev)
+{
+	struct ec_softc *sc;
+
+	sc = device_get_softc(dev);
+
+	bus_release(sc);
+
+	return (0);
+}
+
 static device_method_t ec_methods[] = {
 	DEVMETHOD(device_probe,		ec_probe),
 	DEVMETHOD(device_attach,	ec_attach),
+	DEVMETHOD(device_detach,	ec_detach),
 	{ 0, 0 }
 };
 



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