From owner-svn-src-head@freebsd.org Tue Sep 1 10:47:43 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16F699C8564; Tue, 1 Sep 2015 10:47:43 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 078ED156E; Tue, 1 Sep 2015 10:47:43 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.70]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t81AlgjY043885; Tue, 1 Sep 2015 10:47:42 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t81AlgII043884; Tue, 1 Sep 2015 10:47:42 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201509011047.t81AlgII043884@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 1 Sep 2015 10:47:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r287356 - head/sys/dev/mmc/host X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Sep 2015 10:47:43 -0000 Author: andrew Date: Tue Sep 1 10:47:42 2015 New Revision: 287356 URL: https://svnweb.freebsd.org/changeset/base/287356 Log: 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 Modified: head/sys/dev/mmc/host/dwmmc.c Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Tue Sep 1 09:33:24 2015 (r287355) +++ head/sys/dev/mmc/host/dwmmc.c Tue Sep 1 10:47:42 2015 (r287356) @@ -538,7 +538,6 @@ static int dwmmc_attach(device_t dev) { struct dwmmc_softc *sc; - device_t child; int error; int slot; @@ -574,8 +573,6 @@ dwmmc_attach(device_t dev) device_printf(dev, "Hardware version ID is %04x\n", READ4(sc, SDMMC_VERID) & 0xffff); - sc->use_pio = 0; - sc->pwren_inverted = 0; sc->desc_count = DESC_MAX; 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.caps = MMC_CAP_4_BIT_DATA; - child = device_add_child(dev, "mmc", 0); + device_add_child(dev, "mmc", 0); return (bus_generic_attach(dev)); }