Re: [PATCHv3 5/5] misc: gehc-achc: new driver
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-05-28 14:57:03
Also in:
linux-spi, lkml
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: 2021-05-28 14:57:03
Also in:
linux-spi, lkml
On Fri, May 28, 2021 at 04:06:54PM +0200, Sebastian Reichel wrote:
quoted
quoted
+ /* + * The sysfs properties are bound to the dummy device, since the main device already + * uses drvdata assigned by the spidev driver. + */ + spi_set_drvdata(achc->ezport, achc); + ret = devm_device_add_group(&achc->ezport->dev, &gehc_achc_attr_group);You just raced and lost. Please use the default groups attribute for your driver instead of this. Or properly attach it to the device some other way, but what you have done here does not work, sorry.I've been told the race got fixed from kernel POV? https://lore.kernel.org/linux-input/20200521055400.GX89269@dtor-ws/ (local)
Kind of, it's still not good to do this "by hand", the driver core should do it for you.
If this is still an issue, I think most (all?) existing instances of devm_device_add_group() are a problem and it makes sense to have a checkpatch warning for it.
Yes, I need to just get rid of that call entirely. I'll sick one of my interns on it... thanks, greg k-h