Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp19805rbb; Fri, 23 Feb 2024 10:17:25 -0800 (PST) X-Forwarded-Encrypted: i=4; AJvYcCUBZt4sku7y6iGJRxy7RNcfESg6OOnH9Orz+NGwkLjQfN7S5TnknyeIoQ+AxGLgKuROIyZ+g31FhbxQMDQU/sn6E4C3TgyO8DkyQYQUKQ== X-Google-Smtp-Source: AGHT+IElM1G/JtmPIsASXY7jcf9AEpiJdS3BNUSegClg/EPtYCLp6WRUAj0fcM/yAn3Zr4UbrzA9 X-Received: by 2002:a17:903:98f:b0:1dc:5465:a9e7 with SMTP id mb15-20020a170903098f00b001dc5465a9e7mr814136plb.12.1708712245490; Fri, 23 Feb 2024 10:17:25 -0800 (PST) ARC-Seal: i=3; a=rsa-sha256; t=1708712245; cv=pass; d=google.com; s=arc-20160816; b=tdniuS1EgPgji86hD81fTr6338ffpoWvnxc9UUiUHW7MwHQ3i5pjTIE+kIVZdc1LXT 7hAnX5TyWyxIWgwtnLhy7V/qIJWk6alg7AgunmmVHsVzCi+RRBrZ2pfdOvpeZs6A8wNk 4TGCIqIKNMqKMEv369vVpFCswNGTcdUETBiq7LIeR+NVZ/g9N2Wjci6PTSg0O7SsUY4x CqirYwXxYsvkH7che4il6FiRe42Zb+gy0ooUkd+vwWbJjx29+aZdHgpUnwbbA+AGGYL4 4DScv6HN+5o3Glva90QMGrtayysLZSfR+9KQVmPCRsYPEULxNEm+OekN9KT9RFyrAhJi nQRQ== ARC-Message-Signature: i=3; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=sa5OLBki+wJAUWQKXeTEXqd/31Z9fCA2pAdQTW32zog=; fh=j5IH3SKDo+HWwbMxWKtyEhymuQHyFudsoc+1g2oR0M8=; b=Bn1Q43lnp2HJLeY/8SgPpNdin90h7XBflHqeXnS7+dLvVbLrne7K54T7SuB5mlz/93 RjsA1qk74398qwhFusTi49V0LYFVoi8eaZDGH8kVpfwNrKAi1gWEHMBdQLIpsNwT6vG5 ZFcce4IYQPSrkMHyEeMmV5x/yp3mmoApQds9zw5SbNHog9K9H/lwrnRi/lAiy1iaFpkA c1zpZUmE00ULAbyAqLTmxeHcWAWVg2zNGf6eAtzEUCdF7iyFpUb9qwHJfakIohdungz9 nsvk15d75bneuLNS0nBXaYXNamnI9kmBK5BVYw6vaUFhkymaFcL7bPicbWjhoOyym+i1 +MTg==; dara=google.com ARC-Authentication-Results: i=3; mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=RpbAmOyl; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78957-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78957-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id q15-20020a170902eb8f00b001dbc70ef010si12144051plg.362.2024.02.23.10.17.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 10:17:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78957-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@iki.fi header.s=meesny header.b=RpbAmOyl; arc=pass (i=2 spf=pass spfdomain=iki.fi dkim=pass dkdomain=iki.fi); spf=pass (google.com: domain of linux-kernel+bounces-78957-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78957-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BAE97B228D9 for ; Fri, 23 Feb 2024 18:15:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 94CFF1448F8; Fri, 23 Feb 2024 18:15:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b="RpbAmOyl" Received: from meesny.iki.fi (meesny.iki.fi [195.140.195.201]) (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 0501F141987; Fri, 23 Feb 2024 18:15:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass smtp.client-ip=195.140.195.201 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712115; cv=pass; b=ELH3YXjLbI84b9xJtr2UJWjwfK4JaenrU8zXUrQ+JjPNDhnn8JrVhaNksSfMCzC8cn/fH01TOYgnD46oayVapWtj8QyBKylcBBKj+g1SAYedIq/Tz+YJSldPQWbLJsOQERRbU4Pw8Ta/cpdiOEP8vz2EyRjd6+Jha1IMW4O4ueo= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708712115; c=relaxed/simple; bh=vW6K6F1wIHMJu+ei/OKI8GNIPUdGz3I6yFBJFhPrs9M=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sV327S/kqXYA3tjvaU2oDi/J34kymp4u2qq8cEXKcOeuVw8aIFaK8sBWJMGEm+3wnQJx/pIXLUse3H86QhmAigvnLqEPIy7eIHI5vuyG8FGMOQLdHNxftcYT0MSaMppecIP0O1I2gFt+u9URf9RKE3mRA3LYKXrrfAmtIZl6fbM= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi; spf=pass smtp.mailfrom=iki.fi; dkim=pass (1024-bit key) header.d=iki.fi header.i=@iki.fi header.b=RpbAmOyl; arc=pass smtp.client-ip=195.140.195.201 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=iki.fi Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=iki.fi Received: from darkstar.musicnaut.iki.fi (85-76-119-15-nat.elisa-mobile.fi [85.76.119.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: aaro.koskinen) by meesny.iki.fi (Postfix) with ESMTPSA id 4ThJ8910mTzyyn; Fri, 23 Feb 2024 20:15:05 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sa5OLBki+wJAUWQKXeTEXqd/31Z9fCA2pAdQTW32zog=; b=RpbAmOyllID+SUyTYoco8Irls8g2fHMWE8jkVCbUeqaYX5wx7hSje9ubBGLxkVA371EIE6 acYpWWGtHHAdTBpWQQeMw2b/ZeDhWHUAhFSqsFFGuytB65bYd+cF+YEvXQtYFY05jW0Z2u dbFdvvp68Mps7fPF9PibulJfY5Wt4iQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=meesny; t=1708712105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sa5OLBki+wJAUWQKXeTEXqd/31Z9fCA2pAdQTW32zog=; b=EhkKf2Wh74gtkvmuzMJg+l3mgx/ZQ2cETOGrZcnN0uWIjQAU/csUOMYgga4Ki2C6JL4FDk Bg4qmW7wmnOSO07mJCsjPkzsO7w6ee7tQaPJBco2ufZMjE7ZyKO3FEXWO1WG9Ga1sa2O9m 1r+/12Ako1j8PWjhox6nUui7MRIYdRc= ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=aaro.koskinen smtp.mailfrom=aaro.koskinen@iki.fi ARC-Seal: i=1; s=meesny; d=iki.fi; t=1708712105; a=rsa-sha256; cv=none; b=S6OuJ8hhRP2YFox1Qu3d1y0fXql9o5qo0pywxX8GVOnf0n1dNYH+vostpDzlF4I2v5vXI+ GsBbAZSGP8vjmE4MdOP7j+v5JSu7PytgiBR9hfHp62eFqw57IpaLcM3fSm0i5Q2qKgZgYk sKNLCK+4sRmzVfQtTNYYR3zGwdlsj8o= From: Aaro Koskinen To: Tony Lindgren , Ulf Hansson , Linus Walleij , linux-omap@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Aaro Koskinen Subject: [PATCH 4/5] MMC: OMAP: fix deferred probe Date: Fri, 23 Feb 2024 20:14:38 +0200 Message-Id: <20240223181439.1099750-5-aaro.koskinen@iki.fi> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240223181439.1099750-1-aaro.koskinen@iki.fi> References: <20240223181439.1099750-1-aaro.koskinen@iki.fi> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit After a deferred probe, GPIO descriptor lookup will fail with EBUSY. Fix by using managed descriptors. Fixes: e519f0bb64ef ("ARM/mmc: Convert old mmci-omap to GPIO descriptors") Signed-off-by: Aaro Koskinen --- drivers/mmc/host/omap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/omap.c b/drivers/mmc/host/omap.c index aa40e1a9dc29..50408771ae01 100644 --- a/drivers/mmc/host/omap.c +++ b/drivers/mmc/host/omap.c @@ -1259,18 +1259,18 @@ static int mmc_omap_new_slot(struct mmc_omap_host *host, int id) slot->pdata = &host->pdata->slots[id]; /* Check for some optional GPIO controls */ - slot->vsd = gpiod_get_index_optional(host->dev, "vsd", - id, GPIOD_OUT_LOW); + slot->vsd = devm_gpiod_get_index_optional(host->dev, "vsd", + id, GPIOD_OUT_LOW); if (IS_ERR(slot->vsd)) return dev_err_probe(host->dev, PTR_ERR(slot->vsd), "error looking up VSD GPIO\n"); - slot->vio = gpiod_get_index_optional(host->dev, "vio", - id, GPIOD_OUT_LOW); + slot->vio = devm_gpiod_get_index_optional(host->dev, "vio", + id, GPIOD_OUT_LOW); if (IS_ERR(slot->vio)) return dev_err_probe(host->dev, PTR_ERR(slot->vio), "error looking up VIO GPIO\n"); - slot->cover = gpiod_get_index_optional(host->dev, "cover", - id, GPIOD_IN); + slot->cover = devm_gpiod_get_index_optional(host->dev, "cover", + id, GPIOD_IN); if (IS_ERR(slot->cover)) return dev_err_probe(host->dev, PTR_ERR(slot->cover), "error looking up cover switch GPIO\n"); @@ -1402,8 +1402,8 @@ static int mmc_omap_probe(struct platform_device *pdev) host->dev = &pdev->dev; platform_set_drvdata(pdev, host); - host->slot_switch = gpiod_get_optional(host->dev, "switch", - GPIOD_OUT_LOW); + host->slot_switch = devm_gpiod_get_optional(host->dev, "switch", + GPIOD_OUT_LOW); if (IS_ERR(host->slot_switch)) return dev_err_probe(host->dev, PTR_ERR(host->slot_switch), "error looking up slot switch GPIO\n"); -- 2.39.2