Skip to content

Commit

Permalink
usb: musb: omap2430: minor cleanups.
Browse files Browse the repository at this point in the history
1/ remove incorrect comment (it is a non-blocking notifier)
2/ Use correct symbolic return value for notifier
3/ Make sure otg_notifier_work is cancelled before module exit.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
NeilBrown authored and Felipe Balbi committed Jan 25, 2012
1 parent c09d6b5 commit b30b3c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/musb/omap2430.c
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,6 @@ static inline void omap2430_low_level_init(struct musb *musb)
musb_writel(musb->mregs, OTG_FORCESTDBY, l);
}

/* blocking notifier support */
static int musb_otg_notifications(struct notifier_block *nb,
unsigned long event, void *unused)
{
Expand All @@ -231,7 +230,7 @@ static int musb_otg_notifications(struct notifier_block *nb,
musb->xceiv_event = event;
schedule_work(&musb->otg_notifier_work);

return 0;
return NOTIFY_OK;
}

static void musb_otg_notifier_work(struct work_struct *data_notifier_work)
Expand Down Expand Up @@ -386,6 +385,7 @@ static void omap2430_musb_disable(struct musb *musb)
static int omap2430_musb_exit(struct musb *musb)
{
del_timer_sync(&musb_idle_timer);
cancel_work_sync(&musb->otg_notifier_work);

omap2430_low_level_exit(musb);
otg_put_transceiver(musb->xceiv);
Expand Down

0 comments on commit b30b3c6

Please sign in to comment.