Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc Simplyfy sdmmc_io_set_blocklen function signat...
details: https://anonhg.NetBSD.org/src/rev/436134eb78a0
branches: trunk
changeset: 966370:436134eb78a0
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Mon Oct 28 06:20:01 2019 +0000
description:
Simplyfy sdmmc_io_set_blocklen function signature by dropping the
extra softc pointer. Aligns with OpenBSD.
diffstat:
sys/dev/sdmmc/if_bwfm_sdio.c | 6 +++---
sys/dev/sdmmc/sdmmc_io.c | 7 ++++---
sys/dev/sdmmc/sdmmcvar.h | 5 ++---
3 files changed, 9 insertions(+), 9 deletions(-)
diffs (69 lines):
diff -r 6c3932c17745 -r 436134eb78a0 sys/dev/sdmmc/if_bwfm_sdio.c
--- a/sys/dev/sdmmc/if_bwfm_sdio.c Mon Oct 28 06:16:46 2019 +0000
+++ b/sys/dev/sdmmc/if_bwfm_sdio.c Mon Oct 28 06:20:01 2019 +0000
@@ -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 @@
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) {
diff -r 6c3932c17745 -r 436134eb78a0 sys/dev/sdmmc/sdmmc_io.c
--- a/sys/dev/sdmmc/sdmmc_io.c Mon Oct 28 06:16:46 2019 +0000
+++ b/sys/dev/sdmmc/sdmmc_io.c Mon Oct 28 06:20:01 2019 +0000
@@ -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 @@
}
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;
diff -r 6c3932c17745 -r 436134eb78a0 sys/dev/sdmmc/sdmmcvar.h
--- a/sys/dev/sdmmc/sdmmcvar.h Mon Oct 28 06:16:46 2019 +0000
+++ b/sys/dev/sdmmc/sdmmcvar.h Mon Oct 28 06:20:01 2019 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index