Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-20 Thread Wolfram Sang
> > Right, and I'm not saying it should be, just move the existing logic > > into the release callback, and the code flow should be the same and we > > don't end up with an "empty" release callback. But as Russell says, even if we don't have the empty callback, we still create the problem shown b

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-20 Thread Russell King - ARM Linux
On Tue, Jan 20, 2015 at 03:12:56PM +0800, Greg Kroah-Hartman wrote: > On Tue, Jan 20, 2015 at 08:05:20AM +0100, Lars-Peter Clausen wrote: > > On 01/20/2015 02:41 AM, Greg Kroah-Hartman wrote: > > >On Mon, Jan 19, 2015 at 11:04:27PM +, Russell King - ARM Linux wrote: > > >>On Tue, Jan 20, 2015 a

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Lars-Peter Clausen
On 01/20/2015 08:12 AM, Greg Kroah-Hartman wrote: On Tue, Jan 20, 2015 at 08:05:20AM +0100, Lars-Peter Clausen wrote: On 01/20/2015 02:41 AM, Greg Kroah-Hartman wrote: On Mon, Jan 19, 2015 at 11:04:27PM +, Russell King - ARM Linux wrote: On Tue, Jan 20, 2015 at 03:01:42AM +0800, Greg Kroah

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Greg Kroah-Hartman
On Tue, Jan 20, 2015 at 08:05:20AM +0100, Lars-Peter Clausen wrote: > On 01/20/2015 02:41 AM, Greg Kroah-Hartman wrote: > >On Mon, Jan 19, 2015 at 11:04:27PM +, Russell King - ARM Linux wrote: > >>On Tue, Jan 20, 2015 at 03:01:42AM +0800, Greg Kroah-Hartman wrote: > >>>On Mon, Jan 19, 2015 at 0

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Lars-Peter Clausen
On 01/20/2015 02:41 AM, Greg Kroah-Hartman wrote: On Mon, Jan 19, 2015 at 11:04:27PM +, Russell King - ARM Linux wrote: On Tue, Jan 20, 2015 at 03:01:42AM +0800, Greg Kroah-Hartman wrote: On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: diff --git a/drivers/i2c/i2c-core.c b/dr

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Greg Kroah-Hartman
On Mon, Jan 19, 2015 at 11:04:27PM +, Russell King - ARM Linux wrote: > On Tue, Jan 20, 2015 at 03:01:42AM +0800, Greg Kroah-Hartman wrote: > > On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: > > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c > > > index 39d25a8cb1

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Russell King - ARM Linux
On Tue, Jan 20, 2015 at 03:01:42AM +0800, Greg Kroah-Hartman wrote: > On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: > > diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c > > index 39d25a8cb1ad..15cc5902cf89 100644 > > --- a/drivers/i2c/i2c-core.c > > +++ b/drivers/i2c/i2c

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Wolfram Sang
> > @@ -1184,8 +1183,7 @@ EXPORT_SYMBOL_GPL(i2c_new_dummy); > > > > static void i2c_adapter_dev_release(struct device *dev) > > { > > - struct i2c_adapter *adap = to_i2c_adapter(dev); > > - complete(&adap->dev_released); > > + /* empty, but the driver core insists we need a release functi

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Greg Kroah-Hartman
On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: > Back in the days, sysfs seemed to have refcounting issues and subsystems > needed a completion to be safe. This is not the case anymore, so I2C can > get rid of this code. There is noone else besides I2C doing something > like this cur

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Lars-Peter Clausen
On 01/19/2015 07:55 PM, Wolfram Sang wrote: [...] Let's get rid of this code before really nobody knows/understands anymore what this was for and if it has a subtle use. Getting rid of this is the right thing, cause it's just not how it should be done, but unfortunately it is not as simple as

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Wolfram Sang
On Mon, Jan 19, 2015 at 07:12:10PM +, Russell King - ARM Linux wrote: > On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: > > Back in the days, sysfs seemed to have refcounting issues and subsystems > > needed a completion to be safe. This is not the case anymore, so I2C can > > get

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Russell King - ARM Linux
On Mon, Jan 19, 2015 at 07:55:56PM +0100, Wolfram Sang wrote: > Back in the days, sysfs seemed to have refcounting issues and subsystems > needed a completion to be safe. This is not the case anymore, so I2C can > get rid of this code. There is noone else besides I2C doing something > like this cur

Re: [PATCH] i2c: drop ancient protection against sysfs refcounting issues

2015-01-19 Thread Pantelis Antoniou
Hi Wolfram, > On Jan 19, 2015, at 20:55 , Wolfram Sang wrote: > > Back in the days, sysfs seemed to have refcounting issues and subsystems > needed a completion to be safe. This is not the case anymore, so I2C can > get rid of this code. There is noone else besides I2C doing something > like thi