lkml.org 
[lkml]   [2013]   [Dec]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH] usb: phy: Initilize the spinlock in notifier

> -----Original Message-----
> From: Neil Zhang [mailto:zhangwm@marvell.com]
> Sent: 2013年12月11日 13:05
> To: balbi@ti.com; gregkh@linuxfoundation.org
> Cc: linux-usb@vger.kernel.org; linux-kernel@vger.kernel.org; Neil Zhang
> Subject: [PATCH] usb: phy: Initilize the spinlock in notifier
>
> We need to initilize every spinlock before use it.
> So lets initilize the spinlock in notifier when add a new phy device.
>
> Signed-off-by: Neil Zhang <zhangwm@marvell.com>
> ---
> drivers/usb/phy/phy.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/phy/phy.c b/drivers/usb/phy/phy.c index
> 1b74523..479ceb8 100644
> --- a/drivers/usb/phy/phy.c
> +++ b/drivers/usb/phy/phy.c
> @@ -367,6 +367,8 @@ int usb_add_phy_dev(struct usb_phy *x)
> return -EINVAL;
> }
>
> + spin_lock_init(&x->notifier.lock);
> +
> spin_lock_irqsave(&phy_lock, flags);
> list_for_each_entry(phy_bind, &phy_bind_list, list)
> if (!(strcmp(phy_bind->phy_dev_name, dev_name(x->dev))))
> --
> 1.7.9.5

Please ignore this patch and check another one.
Sorry for this noise.

Best Regards,
Neil Zhang
\
 
 \ /
  Last update: 2013-12-11 07:41    [W:0.040 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site