Re: [driver-core PATCH v9 2/9] device core: Consolidate locking and unlocking of parent and device

2018-12-17 Thread Alexander Duyck
On Fri, 2018-12-14 at 11:40 +0100, Rafael J. Wysocki wrote: > somOn Thu, Dec 13, 2018 at 1:45 AM Alexander Duyck > wrote: > > > > Try to consolidate all of the locking and unlocking of both the parent and > > device when attaching or removing a driver from a given device. > > > > To do that I f

Re: [driver-core PATCH v9 2/9] device core: Consolidate locking and unlocking of parent and device

2018-12-14 Thread Rafael J. Wysocki
somOn Thu, Dec 13, 2018 at 1:45 AM Alexander Duyck wrote: > > Try to consolidate all of the locking and unlocking of both the parent and > device when attaching or removing a driver from a given device. > > To do that I first consolidated the lock pattern into two functions > __device_driver_lock

[driver-core PATCH v9 2/9] device core: Consolidate locking and unlocking of parent and device

2018-12-12 Thread Alexander Duyck
Try to consolidate all of the locking and unlocking of both the parent and device when attaching or removing a driver from a given device. To do that I first consolidated the lock pattern into two functions __device_driver_lock and __device_driver_unlock. After doing that I then created functions