[PATCH linux dev-4.7 1/2] drivers: fsi: delete device on unscan
Joel Stanley
joel at jms.id.au
Thu Feb 16 11:30:45 AEDT 2017
On Tue, Feb 14, 2017 at 2:41 PM, Eddie James <eajames at linux.vnet.ibm.com> wrote:
> On 02/13/2017 06:18 PM, Joel Stanley wrote:
>>> @@ -512,6 +512,7 @@ static void fsi_master_unscan(struct fsi_master
>>> *master)
>>> list_for_each_entry_safe(fsi_dev, fsi_dev_tmp,
>>> &slave->my_engines, link) {
>>> list_del(&fsi_dev->link);
>>> + device_del(&fsi_dev->dev);
>>> put_device(&fsi_dev->dev);
>>
>> put_device calls kobject_put, but device_del has already called
>> kobject_del. Are you sure this is what you want to do here?
>
>
> Hmm, I was just doing what device_unregister() does. We manually call
> device_add() for these devices, so I understand from the documentation that
> device_del() should be called, but I think device_unregister would work as
> well. I can confirm this works and doesn't throw any warnings after repeated
> fsi scans.
Thanks for looking into this.
I will merge this patch as-is, but please work with Chris to get this
change added to his upstream FSI patchset. The fix should be folded
into his series for his next submission (v4).
Cheers,
Joel
More information about the openbmc
mailing list