Module Name: src Committed By: mlelstv Date: Mon Oct 28 06:20:01 UTC 2019
Modified Files: src/sys/dev/sdmmc: if_bwfm_sdio.c sdmmc_io.c sdmmcvar.h Log Message: Simplyfy sdmmc_io_set_blocklen function signature by dropping the extra softc pointer. Aligns with OpenBSD. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/sdmmc/if_bwfm_sdio.c cvs rdiff -u -r1.17 -r1.18 src/sys/dev/sdmmc/sdmmc_io.c cvs rdiff -u -r1.33 -r1.34 src/sys/dev/sdmmc/sdmmcvar.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/if_bwfm_sdio.c diff -u src/sys/dev/sdmmc/if_bwfm_sdio.c:1.7 src/sys/dev/sdmmc/if_bwfm_sdio.c:1.8 --- src/sys/dev/sdmmc/if_bwfm_sdio.c:1.7 Sun Oct 27 21:39:50 2019 +++ src/sys/dev/sdmmc/if_bwfm_sdio.c Mon Oct 28 06:20:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bwfm_sdio.c,v 1.7 2019/10/27 21:39:50 bad Exp $ */ +/* $NetBSD: if_bwfm_sdio.c,v 1.8 2019/10/28 06:20:01 mlelstv Exp $ */ /* $OpenBSD: if_bwfm_sdio.c,v 1.1 2017/10/11 17:19:50 patrick Exp $ */ /* * Copyright (c) 2010-2016 Broadcom Corporation @@ -293,8 +293,8 @@ bwfm_sdio_attach(device_t parent, device sc->sc_sf[sf->number] = sf; } - sdmmc_io_set_blocklen(sc->sc_sf[1]->sc, sc->sc_sf[1], 64); - sdmmc_io_set_blocklen(sc->sc_sf[2]->sc, sc->sc_sf[2], 512); + sdmmc_io_set_blocklen(sc->sc_sf[1], 64); + sdmmc_io_set_blocklen(sc->sc_sf[2], 512); /* Enable Function 1. */ if (sdmmc_io_function_enable(sc->sc_sf[1]) != 0) { Index: src/sys/dev/sdmmc/sdmmc_io.c diff -u src/sys/dev/sdmmc/sdmmc_io.c:1.17 src/sys/dev/sdmmc/sdmmc_io.c:1.18 --- src/sys/dev/sdmmc/sdmmc_io.c:1.17 Mon Oct 28 06:16:46 2019 +++ src/sys/dev/sdmmc/sdmmc_io.c Mon Oct 28 06:20:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc_io.c,v 1.17 2019/10/28 06:16:46 mlelstv Exp $ */ +/* $NetBSD: sdmmc_io.c,v 1.18 2019/10/28 06:20:01 mlelstv Exp $ */ /* $OpenBSD: sdmmc_io.c,v 1.10 2007/09/17 01:33:33 krw Exp $ */ /* @@ -20,7 +20,7 @@ /* Routines for SD I/O cards. */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: sdmmc_io.c,v 1.17 2019/10/28 06:16:46 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc_io.c,v 1.18 2019/10/28 06:20:01 mlelstv Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -825,9 +825,10 @@ sdmmc_intr_task(void *arg) } int -sdmmc_io_set_blocklen(struct sdmmc_softc *sc, struct sdmmc_function *sf, +sdmmc_io_set_blocklen(struct sdmmc_function *sf, int blklen) { + struct sdmmc_softc *sc = sf->sc; struct sdmmc_function *sf0 = sc->sc_fn0; int error = EINVAL; Index: src/sys/dev/sdmmc/sdmmcvar.h diff -u src/sys/dev/sdmmc/sdmmcvar.h:1.33 src/sys/dev/sdmmc/sdmmcvar.h:1.34 --- src/sys/dev/sdmmc/sdmmcvar.h:1.33 Mon Oct 28 06:16:46 2019 +++ src/sys/dev/sdmmc/sdmmcvar.h Mon Oct 28 06:20:01 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmcvar.h,v 1.33 2019/10/28 06:16:46 mlelstv Exp $ */ +/* $NetBSD: sdmmcvar.h,v 1.34 2019/10/28 06:20:01 mlelstv Exp $ */ /* $OpenBSD: sdmmcvar.h,v 1.13 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -359,8 +359,7 @@ void sdmmc_dump_data(const char *, void int sdmmc_io_enable(struct sdmmc_softc *); void sdmmc_io_scan(struct sdmmc_softc *); int sdmmc_io_init(struct sdmmc_softc *, struct sdmmc_function *); -int sdmmc_io_set_blocklen(struct sdmmc_softc *, struct sdmmc_function *, - int); +int sdmmc_io_set_blocklen(struct sdmmc_function *, int); uint8_t sdmmc_io_read_1(struct sdmmc_function *, int); uint16_t sdmmc_io_read_2(struct sdmmc_function *, int); uint32_t sdmmc_io_read_4(struct sdmmc_function *, int);