Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp257546pxf; Wed, 24 Mar 2021 04:34:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxj3UZr+XW5X+O0VPXgpCmf95GvEpcRORMM1w4mBigtwt/kij0FvjbEFNmXsQ9zbGcRkEXL X-Received: by 2002:aa7:c907:: with SMTP id b7mr2930628edt.37.1616585696886; Wed, 24 Mar 2021 04:34:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616585696; cv=none; d=google.com; s=arc-20160816; b=J8ZgTrykm5jcq7wI6/p+HIKVTYroDCHOkLM60k74ofZUTfEMMEubsBj+5uAwzpJ+IC vhWeie7nJzPiTX2Rf+1AXBMKA9d95/hQ3jHNJigYIm9jy/Ctigq1r2W+uy/WRhew5NEv C1eyvt+MGi5l5TVm07BcPjGhp1O9rymHSaFu4SdZyRX5djVj/oivOF4RwFtYK1YGSAQp iarMQie7kHO+Q4hWyCRm6am119zD3XiDdJ025Z7MAO8PwW0QSIWpuPBleZgFDJ04WEJS F5h2Kpn5wnq5UZoBtxTnn6QBGIG4RPCKNKWWszMq4Ldewb5VRHa0Rotp0AeLJ8k7kVEa GSCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=2lpm7VT5Xvl/ttjiIym5W7FFjS3e12LlC/9il8VoxdY=; b=umdEcUpMctIQgfmEmv90XWmL2A6jM6Sx+CJhh4sIGV8hqwC8/X2N1zzucVu+NyEwSJ 31kWVHZBcXfAonxqXonKDfog6q0PO/jrhl0pvrr2k8WsjUqueZlbhLFihu53XWWtJiKX 1sjCrNqTj2B1aQv6mLu+nT9goeoytOQADZURm2Jt4ZHpdC4mxX2y4Y3UGW4clHjgZgA5 5y8sG8hT7HdKLyPpBg0bAogXYMmjk6nziHpPI/gWpyRGLQbCvY2gfOZOOkw2sk43CPaT y6VeCGR6Doo7vxWJfRzrz/H1tXPPjzhBQNXYrtl7Mu36U+gY12fTFAhLkkIWQREPansq Mveg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LCGjSZgV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c26si1579581eds.593.2021.03.24.04.34.34; Wed, 24 Mar 2021 04:34:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=LCGjSZgV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbhCXKZo (ORCPT + 99 others); Wed, 24 Mar 2021 06:25:44 -0400 Received: from mail.kernel.org ([198.145.29.99]:56736 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235732AbhCXKZJ (ORCPT ); Wed, 24 Mar 2021 06:25:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 80641619E4; Wed, 24 Mar 2021 10:25:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616581508; bh=CDghQllEtQOE/1s+z8/+VBxf90Xro01/LsX/GyYTQlg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=LCGjSZgVlcx0fx/b402atB98b91WBhI5aGb4Kl/h3+JtTy7oK0jdttn63gfcY3+EZ wCkVDAKkaLdgLDgBXP8yH6RhEXI/LIL64XzjKKoQVunaqbV6ZjGboITHYrkZL1uDC7 sy5tnDyLF5axevofI2VOAwlOBFSc7wI+gDMUDhqj2p9xxWQ+TRLtZ1uxhQ16rDtii8 1WsjbV/9bZFr3NBIgT+9CnK+HaqOb/E6p36CDiKed2L7+2IdznE0lAabOTdxw8yAQO LCBC09CF5lMylQcF6AKyyUuaYFd/LLds7bOFo1dWeMZoDbRZkbpBfXOQq+JIXIrLLp fZLVpU/1XpjHg== Received: by earth.universe (Postfix, from userid 1000) id 76B663C0C96; Wed, 24 Mar 2021 11:25:06 +0100 (CET) Date: Wed, 24 Mar 2021 11:25:06 +0100 From: Sebastian Reichel To: Matti Vaittinen Cc: Matti Vaittinen , Hans de Goede , MyungJoo Ham , Chanwoo Choi , Chen-Yu Tsai , Greg Kroah-Hartman , linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org Subject: Re: [PATCH 2/2] power: supply: axp20x_usb_power: fix work-queue init Message-ID: <20210324102506.3ta2zstmrwq4wswb@earth.universe> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="votk3apotqepkpt5" Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --votk3apotqepkpt5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Wed, Mar 24, 2021 at 11:21:34AM +0200, Matti Vaittinen wrote: > The commit 6d0c5de2fd84 > ("power: supply: Clean-up few drivers by using managed work init") > Re-introduced wrong order of initializing work-queue and requesting > the IRQs which was originally fixed by the commit b5e8642ed95f > ("power: supply: axp20x_usb_power: Init work before enabling IRQs") >=20 > In addition this caused the work queue to be initialized twice. >=20 > Fix it again. >=20 > Fixes: 6d0c5de2fd84 ("power: supply: Clean-up few drivers by using manage= d work init") >=20 > Signed-off-by: Matti Vaittinen > Reported-by: Chen-Yu Tsai > --- Acked-by: Sebastian Reichel Needs to be merged by Greg, since I do not have 6d0c5de2fd84 in my tree. -- Sebastian > drivers/power/supply/axp20x_usb_power.c | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) >=20 > diff --git a/drivers/power/supply/axp20x_usb_power.c b/drivers/power/supp= ly/axp20x_usb_power.c > index 4259709e3491..e954970b50e6 100644 > --- a/drivers/power/supply/axp20x_usb_power.c > +++ b/drivers/power/supply/axp20x_usb_power.c > @@ -594,7 +594,11 @@ static int axp20x_usb_power_probe(struct platform_de= vice *pdev) > power->axp20x_id =3D axp_data->axp20x_id; > power->regmap =3D axp20x->regmap; > power->num_irqs =3D axp_data->num_irq_names; > - INIT_DELAYED_WORK(&power->vbus_detect, axp20x_usb_power_poll_vbus); > + > + ret =3D devm_delayed_work_autocancel(&pdev->dev, &power->vbus_detect, > + axp20x_usb_power_poll_vbus); > + if (ret) > + return ret; > =20 > if (power->axp20x_id =3D=3D AXP202_ID) { > /* Enable vbus valid checking */ > @@ -647,10 +651,6 @@ static int axp20x_usb_power_probe(struct platform_de= vice *pdev) > } > } > =20 > - ret =3D devm_delayed_work_autocancel(&pdev->dev, &power->vbus_detect, > - axp20x_usb_power_poll_vbus); > - if (ret) > - return ret; > if (axp20x_usb_vbus_needs_polling(power)) > queue_delayed_work(system_power_efficient_wq, &power->vbus_detect, 0); > =20 > --=20 > 2.25.4 >=20 >=20 > --=20 > Matti Vaittinen, Linux device drivers > ROHM Semiconductors, Finland SWDC > Kiviharjunlenkki 1E > 90220 OULU > FINLAND >=20 > ~~~ "I don't think so," said Rene Descartes. Just then he vanished ~~~ > Simon says - in Latin please. > ~~~ "non cogito me" dixit Rene Descarte, deinde evanescavit ~~~ > Thanks to Simon Glass for the translation =3D]=20 --votk3apotqepkpt5 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAmBbE38ACgkQ2O7X88g7 +prwMxAAkb2bEeLaQGKPtNCmvj7cRBq7+hybT4XSOOuDk4+ETI7xYL/FxW2hSXoR 15AlwNzmjz/SHYi0qhEi7BrZvrniYYyXRk0Fc7eITlFhxNO52amUGa9LgNFoFn+G B0ZfX2Y1gzfkHhtbQrN0PwaCLAcfCfcdmQ45U+Vk7prkuZhN9QvVLAYzR8MIcuFs jt7buPU4TeUeFeWNTygvxaOtc0eaWz27LBgS4Tll2dKTZIN1fW5d2Ey0z99QNCrB Tix4UiUmcGfzSfbxm8pW1MBLmsfrqLPruqx3E8P/2e2F27nR85ZZ2cwhx+mIdryn zbNBxwcjnl0XB5cbDTxDox6zPBMiqzfzXyDvRQj03fsv7t3aEg8sTVrhi1f3qfD+ VxWxlP8HXiYs2mrJ0Ecim7IAGL4UwCusTnY6nI6OPy50iM6rVHAjJ1AniZi9/p8G e8szpn1CbueFfzxlm0diIoyZE1HsZPh6iNe6qQlili2Cf+V0w7ggxcTM3leFCBfl 4/oNInN5vxgpr66no8Y+Fzk6jhQGLdoKgY2ljLT1O5bV5hIyj0DnjAkR7d2KWMmG Ud2muBNJfjDKMCxZ40neJG3ROrMvzuuVOx7fGVt8G6GcA9bQ5ZSnxtI9QIUQ0uiu DZifWuifni/0Yuz56esBWqnT8QIL+aAW4WJS2ioGiOdoiCDzs/U= =/82U -----END PGP SIGNATURE----- --votk3apotqepkpt5--