Module Name:    src
Committed By:   jmcneill
Date:           Sat Oct  4 18:09:33 UTC 2014

Modified Files:
        src/sys/dev/sdmmc: sdhc.c sdhcvar.h

Log Message:
pass sdhc_softc instead of sdhc_host to sc_vendor_transfer_data_dma, since the 
vendor specific code has no visibility into struct sdhc_host and can easily do 
device_private(sdhc_softc->sc_dev)


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/dev/sdmmc/sdhc.c
cvs rdiff -u -r1.14 -r1.15 src/sys/dev/sdmmc/sdhcvar.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/sdmmc/sdhc.c
diff -u src/sys/dev/sdmmc/sdhc.c:1.50 src/sys/dev/sdmmc/sdhc.c:1.51
--- src/sys/dev/sdmmc/sdhc.c:1.50	Thu Oct  2 18:14:38 2014
+++ src/sys/dev/sdmmc/sdhc.c	Sat Oct  4 18:09:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhc.c,v 1.50 2014/10/02 18:14:38 mlelstv Exp $	*/
+/*	$NetBSD: sdhc.c,v 1.51 2014/10/04 18:09:32 jmcneill Exp $	*/
 /*	$OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $	*/
 
 /*
@@ -23,7 +23,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.50 2014/10/02 18:14:38 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.51 2014/10/04 18:09:32 jmcneill Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_sdmmc.h"
@@ -1272,6 +1272,7 @@ sdhc_start_command(struct sdhc_host *hp,
 static void
 sdhc_transfer_data(struct sdhc_host *hp, struct sdmmc_command *cmd)
 {
+	struct sdhc_softc *sc = hp->sc;
 	int error;
 
 	DPRINTF(1,("%s: data transfer: resp=%08x datalen=%u\n", HDEVNAME(hp),
@@ -1289,7 +1290,7 @@ sdhc_transfer_data(struct sdhc_host *hp,
 
 	if (cmd->c_dmamap != NULL) {
 		if (hp->sc->sc_vendor_transfer_data_dma != NULL) {
-			error = hp->sc->sc_vendor_transfer_data_dma(hp, cmd);
+			error = hp->sc->sc_vendor_transfer_data_dma(sc, cmd);
 			if (error == 0 && !sdhc_wait_intr(hp,
 			    SDHC_TRANSFER_COMPLETE, SDHC_TRANSFER_TIMEOUT)) {
 				error = ETIMEDOUT;

Index: src/sys/dev/sdmmc/sdhcvar.h
diff -u src/sys/dev/sdmmc/sdhcvar.h:1.14 src/sys/dev/sdmmc/sdhcvar.h:1.15
--- src/sys/dev/sdmmc/sdhcvar.h:1.14	Fri Sep 12 19:45:16 2014
+++ src/sys/dev/sdmmc/sdhcvar.h	Sat Oct  4 18:09:32 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdhcvar.h,v 1.14 2014/09/12 19:45:16 jakllsch Exp $	*/
+/*	$NetBSD: sdhcvar.h,v 1.15 2014/10/04 18:09:32 jmcneill Exp $	*/
 /*	$OpenBSD: sdhcvar.h,v 1.3 2007/09/06 08:01:01 jsg Exp $	*/
 
 /*
@@ -60,7 +60,7 @@ struct sdhc_softc {
 	int (*sc_vendor_write_protect)(struct sdhc_softc *);
 	int (*sc_vendor_card_detect)(struct sdhc_softc *);
 	int (*sc_vendor_bus_clock)(struct sdhc_softc *, int);
-	int (*sc_vendor_transfer_data_dma)(struct sdhc_host *, struct sdmmc_command *);
+	int (*sc_vendor_transfer_data_dma)(struct sdhc_softc *, struct sdmmc_command *);
 };
 
 /* Host controller functions called by the attachment driver. */

Reply via email to