Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Mar 2017 14:52:03 +0000 (UTC)
From:      Michal Meloun <mmel@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r314914 - head/sys/dev/sdhci
Message-ID:  <201703081452.v28Eq3bI093973@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mmel
Date: Wed Mar  8 14:52:03 2017
New Revision: 314914
URL: https://svnweb.freebsd.org/changeset/base/314914

Log:
  Release all previously allocated resources.

Modified:
  head/sys/dev/sdhci/sdhci_fdt_gpio.c

Modified: head/sys/dev/sdhci/sdhci_fdt_gpio.c
==============================================================================
--- head/sys/dev/sdhci/sdhci_fdt_gpio.c	Wed Mar  8 13:52:45 2017	(r314913)
+++ head/sys/dev/sdhci/sdhci_fdt_gpio.c	Wed Mar  8 14:52:03 2017	(r314914)
@@ -220,9 +220,14 @@ sdhci_fdt_gpio_teardown(struct sdhci_fdt
 	if (gpio == NULL)
 		return;
 
-	if (gpio->cd_ihandler != NULL) {
+	if (gpio->cd_ihandler != NULL)
 		bus_teardown_intr(gpio->dev, gpio->cd_ires, gpio->cd_ihandler);
-	}
+	if (gpio->wp_pin != NULL)
+		gpio_pin_release(gpio->wp_pin);
+	if (gpio->cd_pin != NULL)
+		gpio_pin_release(gpio->cd_pin);
+	if (gpio->cd_ires != NULL)
+		bus_release_resource(gpio->dev, SYS_RES_IRQ, 0, gpio->cd_ires);
 
 	free(gpio, M_DEVBUF);
 }



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