lkml.org 
[lkml]   [2018]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [driver-core PATCH v6 3/9] device core: Consolidate locking and unlocking of parent and device
    From
    Date
    On Thu, 2018-11-08 at 14:43 -0800, jane.chu@oracle.com wrote:
    > Hi, Alex,
    >
    >
    > On 11/08/2018 10:06 AM, Alexander Duyck wrote:
    > > +/*
    > > + * __device_driver_lock - release locks needed to manipulate dev->drv
    >
    > You meant to say __device_driver_unlock, right?

    Yes, you are correct.

    > > + * @dev: Device we will update driver info for
    > > + * @parent: Parent device. Needed if the bus requires parent lock
    > > + *
    > > + * This function will release the required locks for manipulating dev->drv.
    > > + * Normally this will just be the the @dev lock, but when called for a
    > > + * USB interface, @parent lock will be released as well.
    > > + */
    > > +static void __device_driver_unlock(struct device *dev, struct device *parent)
    > > +{
    > > + device_unlock(dev);
    > > + if (parent && dev->bus->need_parent_lock)
    > > + device_unlock(parent);
    > > +}
    >
    > -jane

    Thanks.

    - Alex

    \
     
     \ /
      Last update: 2018-11-08 23:49    [W:6.155 / U:0.024 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site