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: 6000811 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0E90E9F399 for ; Fri, 13 Mar 2015 01:11:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3FC602034B for ; Fri, 13 Mar 2015 01:11:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C2032034A for ; Fri, 13 Mar 2015 01:11:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756154AbbCMBLH (ORCPT ); Thu, 12 Mar 2015 21:11:07 -0400 Received: from mail-ie0-f177.google.com ([209.85.223.177]:35436 "EHLO mail-ie0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756070AbbCMBLG (ORCPT ); Thu, 12 Mar 2015 21:11:06 -0400 Received: by ieclw3 with SMTP id lw3so72586464iec.2 for ; Thu, 12 Mar 2015 18:11:05 -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=Y0pSqcrFgF7dG6CkYOFdViYVMPNwUp0MM2Z8aXfuWmY8jvaB5JVn23OMpc8KzFhEmi vXtK24VzMd6dBcnLbnTM4Yd5Bp76gw0O4aNyN6YPEleUuKjQnqyxOabzS0fQPOBuyuNL fXa60UeJNc+3iR/WQ/8Xch3kwcs7UDVcqrg0uCBQx1bAM8lXpwvhQppZhAUtzQ7Zb/Bp 26GtizI3SnJlEy1fY+G/Yw+gTmtKQbJsBEYmGELPSACzeWsEa+JS9z67ghivSau+zCp1 RPxWExZ0A0ST/3dLwmUHNdyxVEpPWAQdWojHLT/cCZ8JF5tMnk39x7dqrXmEKkDXr14j vZmA== X-Gm-Message-State: ALoCoQm5EugZbnvCOC0fI+jjlOWm49fsbZT/HMzBpsJiOixnjj12D4Do8UEh2sUnN0dupMU4OzJW 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 Cc: Chris Ball , Ray Jui , Scott Branden , Corneliu Doban , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bcm-kernel-feedback-list@broadcom.com, linux-kernel@vger.kernel.org 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) Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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;