From patchwork Thu May 30 02:15:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 800777 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F2991C693; Thu, 30 May 2024 02:15:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.142.180.65 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717035339; cv=none; b=oCs0V611KpiEnYtXFi8Swmt5t3pyPJQYycS/o+HcwWuJzaO097IckOtvTsgYnH67dwjg0e6CMmUaIYzH2bSlYQ2wBBlo4EuRYk6CL6FfKrwIYjtGRFoUHuQcwuyJdsApJDULWijbEkN2DW39WuxYfpfUG7lch/cuTulFE9dqCVo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717035339; c=relaxed/simple; bh=6wAe6PDwPoPRbuAdisd3AgoRY7qZA25aGbQfD/XuvsY=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iF/poW5jiWccKJQebTxrbR5KxgAqfMtimToSpxOIPyZc6svXa7OZico+sCzC2zZ5xY4XaE2blo9XIgC3eSiOgTDVnGK6UnaAk8drCIQCyu3xOVHth6UyT90MZ4AnTpC/yaSDp05bwYvKKGw3aVeKGo3bKmZ6Hw8z0SvxuqPl15g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org; spf=pass smtp.mailfrom=makrotopia.org; arc=none smtp.client-ip=185.142.180.65 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=makrotopia.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=makrotopia.org Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.97.1) (envelope-from ) id 1sCVKD-000000004iN-1qwQ; Thu, 30 May 2024 02:15:29 +0000 Date: Thu, 30 May 2024 03:15:25 +0100 From: Daniel Golle To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Ulf Hansson , Jens Axboe , Srinivas Kandagatla , Daniel Golle , Dave Chinner , Jan Kara , Christian Brauner , Thomas =?iso-8859-1?q?Wei=DFschuh?= , Al Viro , Li Lingfeng , Christian Heusel , Min Li , Avri Altman , Adrian Hunter , Hannes Reinecke , Mikko Rapeli , Yeqi Fu , Victor Shih , Christophe JAILLET , Li Zhijian , "Ricardo B. Marliere" , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mmc@vger.kernel.org, linux-block@vger.kernel.org Subject: [PATCH v2 7/9] mmc: core: set card fwnode_handle Message-ID: References: Precedence: bulk X-Mailing-List: linux-mmc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Set fwnode in case it isn't set yet and of_node is present. Signed-off-by: Daniel Golle --- drivers/mmc/core/bus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/mmc/core/bus.c b/drivers/mmc/core/bus.c index 0ddaee0eae54..e1c5fc1b3ce4 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -364,6 +364,8 @@ int mmc_add_card(struct mmc_card *card) mmc_add_card_debugfs(card); card->dev.of_node = mmc_of_find_child_device(card->host, 0); + if (card->dev.of_node && !card->dev.fwnode) + card->dev.fwnode = &card->dev.of_node->fwnode; device_enable_async_suspend(&card->dev);