From patchwork Thu Jul 13 03:52:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Golle X-Patchwork-Id: 119525 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp1586243vqm; Wed, 12 Jul 2023 21:38:35 -0700 (PDT) X-Google-Smtp-Source: APBJJlGTF0OCVlhxeSChWzfqSfmPdwi0H5L5xoCy717s0OI5skOfdKNulkleH/eKcfUzJwLOYFJc X-Received: by 2002:a9d:67cc:0:b0:6b9:1917:b2f3 with SMTP id c12-20020a9d67cc000000b006b91917b2f3mr647067otn.33.1689223114884; Wed, 12 Jul 2023 21:38:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689223114; cv=none; d=google.com; s=arc-20160816; b=RMx7yYZb37skOjGl7zPKiya6UZ8XH3H/AsgZ6sDdpbWZcMLda7Fjy3fuPDm4D9l3WO AH48mjmX79YDQVF3mE/vxbPiB3Nnf3Hn+OvnVDb3zpavX5X4io4+3eimzgtDyd6tMIc2 G981ab9BIi7uFpWOnix9VTY+Rb0/luphw1F4BYVgt+qQ9wssYZqC72vYZr5YjV3d7PoG n8KiDpnD/fyx4H7GFyjdLWG6LkdIlyMHnQUuda+r+Gx7+gaJSQJ3nCf5vptwFcpGJHH5 Nw2aRW/KhiuAP9iO6NyRVDStzwq0h4HPQzsdHW5OZpafCCGfDJgIZpgBoLE5zyEsqJZ5 zdnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:to:from:date; bh=0P5BXsFOkHiU1J4aFhe2Ttr1eiq/AEQLBGj0P3ieimc=; fh=5qsqEPlpOGNwNAeZPfGY4yAoEwRsF6e0rLjrhlRiGeQ=; b=v5rv4GK0yiMoeg7KNHrsBKbXc1CsEWrDFc+i7VGWMoPvYOCbrWzMMLl487FYZfxufA ZSJNZ30S+MmGI3svi55F0bgxrFSK56zeRylkklyRV+Wmfhj25VJpMl2Gd4Z06QvUxMDq LrPCFmW91iGvtW/C9G9LONQtBpiF1+LoJKSX84iPRwz9BPdOo/vCFevR/QLhhcooQPLq yyyIMoE2bdJ+L/L97BaBhsB7GZBTEAlTm18+6+YDyfCFudk0ODpqQTDhxpu/QMe9tJLc MCAFgb3V3DefM3F7rDS2UF076QOJKBy0ujAMeelukiDNf5SSBN1ArNYo+jIfGucMz9WS 9X8g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020a17090a898a00b00263e1d9c4f2si417404pjn.26.2023.07.12.21.38.21; Wed, 12 Jul 2023 21:38:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233746AbjGMDxW (ORCPT + 99 others); Wed, 12 Jul 2023 23:53:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232133AbjGMDxU (ORCPT ); Wed, 12 Jul 2023 23:53:20 -0400 Received: from pidgin.makrotopia.org (pidgin.makrotopia.org [185.142.180.65]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 000911BF2; Wed, 12 Jul 2023 20:53:18 -0700 (PDT) Received: from local by pidgin.makrotopia.org with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.96) (envelope-from ) id 1qJnOE-0005w0-1M; Thu, 13 Jul 2023 03:53:15 +0000 Date: Thu, 13 Jul 2023 04:52:59 +0100 From: Daniel Golle To: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Ulf Hansson , Ye Bin , Greg Kroah-Hartman , Seunghui Lee Subject: [PATCH] mmc: core: set card fwnode_handle Message-ID: MIME-Version: 1.0 Content-Disposition: inline X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771278816865980867 X-GMAIL-MSGID: 1771278816865980867 Also set card's device 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 2c3074a605fc4..ecf6e23e4c307 100644 --- a/drivers/mmc/core/bus.c +++ b/drivers/mmc/core/bus.c @@ -361,6 +361,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);