diff options
author | Marcin Wojtas <mw@FreeBSD.org> | 2017-09-25 02:06:51 +0000 |
---|---|---|
committer | Marcin Wojtas <mw@FreeBSD.org> | 2017-09-25 02:06:51 +0000 |
commit | 40c2a6da0d84e840a212e3d01a17bfa846d0c13e (patch) | |
tree | 9dd821bcf294ae44b96741c2fddab6ac54533754 /sys/dev/neta/if_mvneta.c | |
parent | 43cc906f409af303632481f6a1fff07f52a56658 (diff) |
Fix gcc compilation issues in the mvneta driver
Compiling mvneta driver with gcc unveiled two issues, that
required fixing.
Reported by: andrew
Obtained from: Semihalf
Notes
Notes:
svn path=/head/; revision=323983
Diffstat (limited to 'sys/dev/neta/if_mvneta.c')
-rw-r--r-- | sys/dev/neta/if_mvneta.c | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/sys/dev/neta/if_mvneta.c b/sys/dev/neta/if_mvneta.c index 010cdd5bce7e..83b98882f77f 100644 --- a/sys/dev/neta/if_mvneta.c +++ b/sys/dev/neta/if_mvneta.c @@ -97,16 +97,6 @@ __FBSDID("$FreeBSD$"); #define A3700_TCLK_250MHZ 250000000 -STATIC uint32_t -mvneta_get_clk() -{ -#if defined(__aarch64__) - return (A3700_TCLK_250MHZ); -#else - return (get_tclk()); -#endif -} - /* Device Register Initialization */ STATIC int mvneta_initreg(struct ifnet *); @@ -213,6 +203,9 @@ STATIC int mvneta_detach(device_t); STATIC int mvneta_miibus_readreg(device_t, int, int); STATIC int mvneta_miibus_writereg(device_t, int, int, int); +/* Clock */ +STATIC uint32_t mvneta_get_clk(void); + static device_method_t mvneta_methods[] = { /* Device interface */ DEVMETHOD(device_detach, mvneta_detach), @@ -354,6 +347,16 @@ static struct { { mvneta_rxtxth_intr, "MVNETA aggregated interrupt" }, }; +STATIC uint32_t +mvneta_get_clk() +{ +#if defined(__aarch64__) + return (A3700_TCLK_250MHZ); +#else + return (get_tclk()); +#endif +} + static int mvneta_set_mac_address(struct mvneta_softc *sc, uint8_t *addr) { @@ -831,11 +834,9 @@ STATIC int mvneta_detach(device_t dev) { struct mvneta_softc *sc; - struct ifnet *ifp; int q; sc = device_get_softc(dev); - ifp = sc->ifp; mvneta_stop(sc); /* Detach network interface */ |