From patchwork Wed Aug 23 11:41:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 804954 X-Patchwork-Delegate: jagannadh.teki@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3xclsQ6rd6z9s7h for ; Wed, 23 Aug 2017 21:42:34 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 9E8F8C21E43; Wed, 23 Aug 2017 11:41:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 3B5A8C21DC5; Wed, 23 Aug 2017 11:41:42 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 2AD70C21D78; Wed, 23 Aug 2017 11:41:39 +0000 (UTC) Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by lists.denx.de (Postfix) with ESMTP id D4DA7C21C2F for ; Wed, 23 Aug 2017 11:41:38 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id DF30A209BA; Wed, 23 Aug 2017 13:41:37 +0200 (CEST) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id B646E20982; Wed, 23 Aug 2017 13:41:37 +0200 (CEST) From: Maxime Ripard To: Jagan Teki , Jaehoon Chung , Simon Glass Date: Wed, 23 Aug 2017 13:41:33 +0200 Message-Id: <20170823114136.10919-2-maxime.ripard@free-electrons.com> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170823114136.10919-1-maxime.ripard@free-electrons.com> References: <20170823114136.10919-1-maxime.ripard@free-electrons.com> Cc: u-boot@lists.denx.de, Maxime Ripard Subject: [U-Boot] [PATCH 1/4] mmc: sunxi: fix legacy MMC initialisation X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The driver-model rework changed, among other things, the way the private data were moved around. It now uses the private field in the struct mmc. However, the mmc_create argument was changed in the process to always pass the array we used to have to store our private structures. The basically means that all the MMC driver instances will now have the private data of the first instance, which obviously doesn't work very well. Pass the proper pointer to mmc_create. Fixes: 034e226bc77e ("dm: mmc: sunxi: Pass private data around explicitly") Signed-off-by: Maxime Ripard Tested-by: Chen-Yu Tsai Tested-by: Jagan Teki Reviewed-by: Jagan Teki --- drivers/mmc/sunxi_mmc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c index 588574fab6a9..30f1f76e9f8c 100644 --- a/drivers/mmc/sunxi_mmc.c +++ b/drivers/mmc/sunxi_mmc.c @@ -498,7 +498,7 @@ struct mmc *sunxi_mmc_init(int sdc_no) if (ret) return NULL; - return mmc_create(cfg, mmc_host); + return mmc_create(cfg, priv); } #else