From mboxrd@z Thu Jan 1 00:00:00 1970 From: Guenter Roeck Subject: Re: [PATCH] [RFC] i2c: Don't wait for device release in i2c_del_adapter Date: Wed, 14 Jan 2015 08:24:43 -0800 Message-ID: <20150114162442.GB18578@roeck-us.net> References: <1421082050-10213-1-git-send-email-pantelis.antoniou@konsulko.com> <20150113152957.GL7660@katana> <20150114144938.4e3c3f52@endymion.delvare> <20150114161525.49c54acc@endymion.delvare> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20150114161525.49c54acc-R0o5gVi9kd7kN2dkZ6Wm7A@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Jean Delvare Cc: Pantelis Antoniou , Wolfram Sang , Matt Porter , Greg Kroah-Hartman , Grant Likely , linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-i2c@vger.kernel.org On Wed, Jan 14, 2015 at 04:15:25PM +0100, Jean Delvare wrote: > On Wed, 14 Jan 2015 15:54:52 +0200, Pantelis Antoniou wrote: > > On Jan 14, 2015, at 15:49 , Jean Delvare wrote: > > > That being said, nobody complained about this in 11 years, so I would > > > be surprised if it was plain wrong. I'd rather question the test code. > > > Where is it? > > > > No-one has apparently tested removing an i2c mux device on a running system > > before. > > I did that. On my system the i2c-i801 driver instantiates an > i2c-mux-gpio device. Unloading the i2c-i801 driver removes that device > and it works fine. Note however that I am not able to unload module > i2c-i801 immediately, I have to unload module i2c-mux-gpio first, as > the latter holds a reference to the former. This is because > i2c-mux-gpio calls i2c_get_adapter() on the parent I2C bus segment at > probing time. > > I see that i2c-mux-pinctrl does the same, but i2c-mux-pca954x and > i2c-mux-pca9541 do not. This might be an issue. I doubt this is related > to your problem though, as these are module references and not device > references. > Should we add get/put functions to those drivers ? Guenter