From patchwork Fri Mar 13 01:11:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 6000821 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2F9AEBF90F for ; Fri, 13 Mar 2015 01:14:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58FE0202E9 for ; Fri, 13 Mar 2015 01:14:02 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 581D6202DD for ; Fri, 13 Mar 2015 01:14:01 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YWE8Q-0005y8-Bq; Fri, 13 Mar 2015 01:11:30 +0000 Received: from mail-ie0-f173.google.com ([209.85.223.173]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YWE8N-0005so-Cy for linux-arm-kernel@lists.infradead.org; Fri, 13 Mar 2015 01:11:27 +0000 Received: by iecvj10 with SMTP id vj10so69543660iec.0 for ; Thu, 12 Mar 2015 18:11:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=OTUYqr5DtrVGVNGGGRbIs3KyPA+AxFx7gED5ZQ4N7Pc=; b=KcK7+Haqc1QghbJnhLtfiZGBnq/LAXf50I8ogg8DU251b4viDLivPke8QaFdOmxqdn m8JZyjIJrK2u/A3+9wGGJaw+vymv6CgwWYX6M8Nks8ir71F4rAbP3WTR2FwQByEWURZJ brd6H4W1brtQdqia1j88e5I/SvIbr0M34Gt5U3+AAwfRI1w+kfBGdfKqupuA15dqNOji yamom4jKBsGxGnatY1sxAX4T1t3pyRg+bpkdgxiHAjKhvsqmiosENH4vtFf2/JBklgy8 GQ7SBaFQJNpJtSWvBKD+t4ItQi59T0iCt+ru8teRnmfxNlgKDjcLVdgkQJDWx0go2QmS CNeQ== X-Gm-Message-State: ALoCoQmAVomqihskYV0KYFC2/3+3+XbbB9l5otF/GNn9DmhH0klyydc+I8fkLSxMa4opK6Fy7p4T X-Received: by 10.42.79.205 with SMTP id s13mr53767586ick.67.1426209064115; Thu, 12 Mar 2015 18:11:04 -0700 (PDT) Received: from dtor-ws ([2620:0:1000:1301:5c1c:2a39:5068:89e]) by mx.google.com with ESMTPSA id s86sm378466ioe.35.2015.03.12.18.11.02 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 12 Mar 2015 18:11:03 -0700 (PDT) Date: Thu, 12 Mar 2015 18:11:01 -0700 From: Dmitry Torokhov To: Ulf Hansson Subject: [PATCH] mmc: sdhci-iproc: fix oops in sdhci_iproc_writew Message-ID: <20150313011101.GA24853@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150312_181127_487105_3D16E84F X-CRM114-Status: GOOD ( 11.41 ) X-Spam-Score: -0.7 (/) Cc: Scott Branden , Corneliu Doban , Ray Jui , linux-mmc@vger.kernel.org, Chris Ball , linux-kernel@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The driver co-allocates sdhci_iproc_host with sdhci_pltfm_host and so to access it we need to use sdhci_pltfm_priv() and not pltfm_host->priv. Signed-off-by: Dmitry Torokhov --- drivers/mmc/host/sdhci-iproc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c index 4139d34..3b423b0 100644 --- a/drivers/mmc/host/sdhci-iproc.c +++ b/drivers/mmc/host/sdhci-iproc.c @@ -97,7 +97,7 @@ static inline void sdhci_iproc_writel(struct sdhci_host *host, u32 val, int reg) static void sdhci_iproc_writew(struct sdhci_host *host, u16 val, int reg) { struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host); - struct sdhci_iproc_host *iproc_host = pltfm_host->priv; + struct sdhci_iproc_host *iproc_host = sdhci_pltfm_priv(pltfm_host); u32 word_shift = REG_OFFSET_IN_BITS(reg); u32 mask = 0xffff << word_shift; u32 oldval, newval;