Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp2668651imd; Sun, 28 Oct 2018 15:34:53 -0700 (PDT) X-Google-Smtp-Source: AJdET5dCI3iCtrhq1I53rXJUXQ94ggz/92aGYCAxfLARpL9zE9veuwp6tfpxYOoNPPEPUstDjPj0 X-Received: by 2002:a17:902:848f:: with SMTP id c15-v6mr11566497plo.119.1540766093402; Sun, 28 Oct 2018 15:34:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540766093; cv=none; d=google.com; s=arc-20160816; b=vGRPnAZbFigG1oBKuFqoJKFL9KrmVpNV2RpupD2tQ9V+j0YQ4iQ8OGKMq2Ptcj7CdE j0pbvEEAqlSqrnEqnkhOLX7AWdgz4RkDErQyFEJgXM5BhUIXgu7KTA9rcCvi3nvqJWOy 44U2iFsTl4cs2QcwypzbWy4UxGk1R7mssDiiQ05jpaGDedzyedwV4aODMfcwxMuL7t0u EVgtVW/tIVZo8sQcSVjrSE6yp5nlXqvommwfEG7CflBXSMbbBC4LptQ6vPBXMrFZMGOp xoUWpMMyAScYYb72T9JcEZrrW3q3PrJLAjEqFCr2WJF6020+EIIhXasb8iLjgqYPHhbe +VRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=rsWaRO6LZUyZdAYWGbvWptKJUXXDlzlVQAKcX7h/etw=; b=0BaNBQZXbwI+RTc4n2s97wS0yyT6SRtZA5yTJRq0utWFJwtnbx5uUx/y/6qzt/Lf+w pIgaJcgxYiWviSVlgN7OBfhlRuCkF3UKPo/Cetf5GkAveXTCGdDeTeFDQbt/e2WnLxm8 ECC0FAzgXD0k+o0NW0XThfvxdxtodpHOopdWa9quH9Ev18geShCKtr1Lv8dHDF9L9O0Q CGSftZR5P7j1L12jmYWDztjTRix0A+3BoViS4Lg1Q0MkBLjbIe9DDeAUhY7zk3O7sUj/ sdpHPCxjOXrOJX5JdhhEnXy5A1eZ4o/r3crxKWebixm0F3C6zA3A03GMDb4STshb0EVa rvKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u2-v6si17849145pgr.97.2018.10.28.15.34.23; Sun, 28 Oct 2018 15:34:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727020AbeJ2HRY (ORCPT + 99 others); Mon, 29 Oct 2018 03:17:24 -0400 Received: from sauhun.de ([88.99.104.3]:58178 "EHLO pokefinder.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725984AbeJ2HRY (ORCPT ); Mon, 29 Oct 2018 03:17:24 -0400 Received: from localhost (unknown [87.113.172.131]) by pokefinder.org (Postfix) with ESMTPSA id A470A4A1CA7; Sun, 28 Oct 2018 23:31:22 +0100 (CET) Date: Sun, 28 Oct 2018 22:31:17 +0000 From: Wolfram Sang To: Charles Keepax , Benjamin Tissoires Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org, patches@opensource.cirrus.com Subject: Re: [PATCH 2/2] i2c: Clear client->irq in i2c_device_remove Message-ID: <20181028223116.GJ1882@kunai> References: <20181019085958.32694-1-ckeepax@opensource.cirrus.com> <20181019085958.32694-2-ckeepax@opensource.cirrus.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="nywXBoy70X0GaB8B" Content-Disposition: inline In-Reply-To: <20181019085958.32694-2-ckeepax@opensource.cirrus.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --nywXBoy70X0GaB8B Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Oct 19, 2018 at 09:59:58AM +0100, Charles Keepax wrote: > The IRQ will be mapped in i2c_device_probe only if client->irq is zero and > i2c_device_remove does not clear this. When rebinding an I2C device, > whos IRQ provider has also been rebound this means that an IRQ mapping > will never be created, causing the I2C device to fail to acquire its > IRQ. Fix this issue by clearing client->irq in i2c_device_remove, > forcing i2c_device_probe to lookup the mapping again. >=20 > Signed-off-by: Charles Keepax Adding Benjamin here again. Also, should there be a Fixes: tag? > --- > drivers/i2c/i2c-core-base.c | 2 ++ > 1 file changed, 2 insertions(+) >=20 > diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c > index 656f0a6fe3adf..28460f6a60cc1 100644 > --- a/drivers/i2c/i2c-core-base.c > +++ b/drivers/i2c/i2c-core-base.c > @@ -430,6 +430,8 @@ static int i2c_device_remove(struct device *dev) > dev_pm_clear_wake_irq(&client->dev); > device_init_wakeup(&client->dev, false); > =20 > + client->irq =3D 0; > + > return status; > } > =20 > --=20 > 2.11.0 >=20 --nywXBoy70X0GaB8B Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEOZGx6rniZ1Gk92RdFA3kzBSgKbYFAlvWOLQACgkQFA3kzBSg KbarpxAAgDPF5ZTzxqcRaHNqgT7B1zs+FSEUT4PilL5Z821riy7NoaVCu9ZPK9h7 Mm3rpjhyK9+lwoeoJYmmxB1zZtO8cARubMM7qqdUg8FtYs9PVw2lcRs3Iuk2V4M2 oSJg3ND6NZsF0odk+PhhUhw6rGNDfq4Pk1w3aCr/HHtw9uoh/Rr2IMUavxYvyxbL hosvpNS1sCcSQK+oNCvWnzVQN+ThBtJ2wvYsBHh9BO+dgIEseASb5JYZgqvfqHGM wTriA3wB0LVbKbTfP8TN5aJRL0UW6oSYiRR7nx7Yy57Wk4hPWQw2SP/iQ22HWPgF elHvHL+TG7VJ1n5MjoF15y+8HRaJE30r77IlirU4cw7Kig1/YZAVSGSP55le37qn PfvFRFSTt51FnQd41XOMQlhI2K/FkbY492oQFeRGl68yQWQmiKllMtAnQi+F/qvI mXeLW0cGF8uY2PqS6tGupMh+hTxM3EuNO/B1TKcBi0e1WV4QsgmtOzh9Ot/hZgZ/ NqOeRfZXsSIpcMnVXZ3x5tGZ1MPdlSWjxZ7Pa7n0xX9oW0mixPiE9G2uR5tdPSGn z7QPdlzr0qYSn/l9BkmpGpQVEnal+GXV+sCamSannlW2RGDN3dLiegphHCQpQ8au xuZm7aYWmlPCBcJMKY0AP4K/lmoP+LiP8p23L2ghF8ZDYmy2a7U= =o0VB -----END PGP SIGNATURE----- --nywXBoy70X0GaB8B--