Remove an variable we only ever write to, and stop assigning 0 to values

in the softc as it's the default value. The latter helps with subclassing
this driver.

Sponsored by:	ABT Systems Ltd
This commit is contained in:
andrew 2015-09-01 10:47:42 +00:00
parent 7a6ac1b312
commit 18228c73ff

View File

@ -538,7 +538,6 @@ static int
dwmmc_attach(device_t dev) dwmmc_attach(device_t dev)
{ {
struct dwmmc_softc *sc; struct dwmmc_softc *sc;
device_t child;
int error; int error;
int slot; int slot;
@ -574,8 +573,6 @@ dwmmc_attach(device_t dev)
device_printf(dev, "Hardware version ID is %04x\n", device_printf(dev, "Hardware version ID is %04x\n",
READ4(sc, SDMMC_VERID) & 0xffff); READ4(sc, SDMMC_VERID) & 0xffff);
sc->use_pio = 0;
sc->pwren_inverted = 0;
sc->desc_count = DESC_MAX; sc->desc_count = DESC_MAX;
if ((sc->hwtype & HWTYPE_MASK) == HWTYPE_ROCKCHIP) { if ((sc->hwtype & HWTYPE_MASK) == HWTYPE_ROCKCHIP) {
@ -651,7 +648,7 @@ dwmmc_attach(device_t dev)
sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340; sc->host.host_ocr = MMC_OCR_320_330 | MMC_OCR_330_340;
sc->host.caps = MMC_CAP_4_BIT_DATA; sc->host.caps = MMC_CAP_4_BIT_DATA;
child = device_add_child(dev, "mmc", 0); device_add_child(dev, "mmc", 0);
return (bus_generic_attach(dev)); return (bus_generic_attach(dev));
} }