Re: [PATCH 1/2] prevent gpio chip drivers from unloading while used

2008-02-09 Thread Guennadi Liakhovetski
On Fri, 8 Feb 2008, David Brownell wrote: > > Yes, that's what I'm saying. I had a GPIO in use and rmmod-ed pca953x. It > > did produce an error message > > > > pca953x 0-0041: gpiochip_remove() failed, -16 > > > > , but rmmod completed. > > Doesn't that seem buglike to you? > > Oh, right --

Re: [PATCH 1/2] prevent gpio chip drivers from unloading while used

2008-02-09 Thread Guennadi Liakhovetski
On Fri, 8 Feb 2008, David Brownell wrote: Yes, that's what I'm saying. I had a GPIO in use and rmmod-ed pca953x. It did produce an error message pca953x 0-0041: gpiochip_remove() failed, -16 , but rmmod completed. Doesn't that seem buglike to you? Oh, right -- the module exit

Re: [PATCH 1/2] prevent gpio chip drivers from unloading while used

2008-02-08 Thread David Brownell
> > > As long as one or more GPIOs on a gpio chip are used its driver should > > > not > > > be unloaded. > > > > The mechanism currently in place is to have gpiochip_remove() fail > > if the platform's teardown() logic doesn't reject it.  (It may be > > practical to have the teardown code get

Re: [PATCH 1/2] prevent gpio chip drivers from unloading while used

2008-02-08 Thread Guennadi Liakhovetski
On Fri, 8 Feb 2008, David Brownell wrote: > On Friday 08 February 2008, Guennadi Liakhovetski wrote: > > As long as one or more GPIOs on a gpio chip are used its driver should not > > be unloaded. > > The mechanism currently in place is to have gpiochip_remove() fail > if the platform's

Re: [PATCH 1/2] prevent gpio chip drivers from unloading while used

2008-02-08 Thread David Brownell
On Friday 08 February 2008, Guennadi Liakhovetski wrote: > As long as one or more GPIOs on a gpio chip are used its driver should not > be unloaded. The mechanism currently in place is to have gpiochip_remove() fail if the platform's teardown() logic doesn't reject it. (It may be practical to

[PATCH 1/2] prevent gpio chip drivers from unloading while used

2008-02-08 Thread Guennadi Liakhovetski
As long as one or more GPIOs on a gpio chip are used its driver should not be unloaded. Signed-off-by: Guennadi Liakhovetski <[EMAIL PROTECTED]> --- Note, that existing drivers do not have to be modified, for example those, that are always statically linked in the kernel, as long as the

Re: [PATCH 1/2] prevent gpio chip drivers from unloading while used

2008-02-08 Thread David Brownell
On Friday 08 February 2008, Guennadi Liakhovetski wrote: As long as one or more GPIOs on a gpio chip are used its driver should not be unloaded. The mechanism currently in place is to have gpiochip_remove() fail if the platform's teardown() logic doesn't reject it. (It may be practical to

Re: [PATCH 1/2] prevent gpio chip drivers from unloading while used

2008-02-08 Thread Guennadi Liakhovetski
On Fri, 8 Feb 2008, David Brownell wrote: On Friday 08 February 2008, Guennadi Liakhovetski wrote: As long as one or more GPIOs on a gpio chip are used its driver should not be unloaded. The mechanism currently in place is to have gpiochip_remove() fail if the platform's teardown()

[PATCH 1/2] prevent gpio chip drivers from unloading while used

2008-02-08 Thread Guennadi Liakhovetski
As long as one or more GPIOs on a gpio chip are used its driver should not be unloaded. Signed-off-by: Guennadi Liakhovetski [EMAIL PROTECTED] --- Note, that existing drivers do not have to be modified, for example those, that are always statically linked in the kernel, as long as the