LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Re: [PATCH] usb langwell otg: use notifier chain of struct otg_transceiver
2011-01-20 6:50 [PATCH] usb langwell otg: use notifier chain of struct otg_transceiver Yang Ruirui
@ 2011-01-20 6:48 ` Felipe Balbi
2011-01-20 7:03 ` Yang Ruirui
0 siblings, 1 reply; 3+ messages in thread
From: Felipe Balbi @ 2011-01-20 6:48 UTC (permalink / raw)
To: Yang Ruirui
Cc: Felipe Balbi, Greg Kroah-Hartman, Hao Wu, Alan Cox, Alek Du,
linux-usb, linux-kernel
Hi,
On Thu, Jan 20, 2011 at 02:50:40PM +0800, Yang Ruirui wrote:
> Use notifier chain in otg_transceiver instead of own notifier chain.
>
> This patch depends on another patch which change otg_transceiver
> notifier chain to atomic, please see:
> https://lkml.org/lkml/2011/1/19/72
(just one point, try to break commit logs at 72 characters next time,
not sure if Greg will ask you to resend, if he does, you can add the
Reviewed-by line below)
> Signed-off-by: Yang Ruirui <ruirui.r.yang@tieto.com>
I have checked that nobody actually uses
intel_mid_otg_register_notifier() thus:
Reviewed-by: Felipe Balbi <balbi@ti.com>
--
balbi
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] usb langwell otg: use notifier chain of struct otg_transceiver
@ 2011-01-20 6:50 Yang Ruirui
2011-01-20 6:48 ` Felipe Balbi
0 siblings, 1 reply; 3+ messages in thread
From: Yang Ruirui @ 2011-01-20 6:50 UTC (permalink / raw)
To: Felipe Balbi, Greg Kroah-Hartman, Hao Wu, Alan Cox, Alek Du,
linux-usb, linux-kernel
Use notifier chain in otg_transceiver instead of own notifier chain.
This patch depends on another patch which change otg_transceiver notifier chain to atomic, please see:
https://lkml.org/lkml/2011/1/19/72
Signed-off-by: Yang Ruirui <ruirui.r.yang@tieto.com>
---
drivers/usb/otg/langwell_otg.c | 7 +++----
include/linux/usb/intel_mid_otg.h | 17 -----------------
2 files changed, 3 insertions(+), 21 deletions(-)
--- linux-2.6.orig/drivers/usb/otg/langwell_otg.c 2010-12-15 15:43:36.000000000 +0800
+++ linux-2.6/drivers/usb/otg/langwell_otg.c 2011-01-20 13:33:28.346040564 +0800
@@ -2124,12 +2124,11 @@ static int langwell_otg_probe(struct pci
}
init_timer(&lnw->hsm_timer);
- ATOMIC_INIT_NOTIFIER_HEAD(&lnw->iotg.iotg_notifier);
+ ATOMIC_INIT_NOTIFIER_HEAD(&lnw->iotg.otg.notifier);
lnw->iotg_notifier.notifier_call = langwell_otg_iotg_notify;
- retval = intel_mid_otg_register_notifier(&lnw->iotg,
- &lnw->iotg_notifier);
+ retval = otg_register_notifier(&lnw->iotg.otg, &lnw->iotg_notifier);
if (retval) {
dev_dbg(lnw->dev, "Failed to register notifier\n");
goto err;
@@ -2187,7 +2186,7 @@ static void langwell_otg_remove(struct p
flush_workqueue(lnw->qwork);
destroy_workqueue(lnw->qwork);
}
- intel_mid_otg_unregister_notifier(&lnw->iotg, &lnw->iotg_notifier);
+ otg_unregister_notifier(&lnw->iotg.otg, &lnw->iotg_notifier);
langwell_otg_free_timers();
/* disable OTGSC interrupt as OTGSC doesn't change in reset */
--- linux-2.6.orig/include/linux/usb/intel_mid_otg.h 2010-12-15 15:43:38.000000000 +0800
+++ linux-2.6/include/linux/usb/intel_mid_otg.h 2011-01-20 13:23:48.809375229 +0800
@@ -117,9 +117,6 @@ struct intel_mid_otg_xceiv {
/* ops to access ulpi */
struct iotg_ulpi_access_ops ulpi_ops;
- /* atomic notifier for interrupt context */
- struct atomic_notifier_head iotg_notifier;
-
/* start/stop USB Host function */
int (*start_host)(struct intel_mid_otg_xceiv *iotg);
int (*stop_host)(struct intel_mid_otg_xceiv *iotg);
@@ -163,18 +160,4 @@ struct intel_mid_otg_xceiv *otg_to_mid_x
#define MID_OTG_NOTIFY_CLIENTADD 0x0009
#define MID_OTG_NOTIFY_CLIENTREMOVE 0x000a
-static inline int
-intel_mid_otg_register_notifier(struct intel_mid_otg_xceiv *iotg,
- struct notifier_block *nb)
-{
- return atomic_notifier_chain_register(&iotg->iotg_notifier, nb);
-}
-
-static inline void
-intel_mid_otg_unregister_notifier(struct intel_mid_otg_xceiv *iotg,
- struct notifier_block *nb)
-{
- atomic_notifier_chain_unregister(&iotg->iotg_notifier, nb);
-}
-
#endif /* __INTEL_MID_OTG_H */
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] usb langwell otg: use notifier chain of struct otg_transceiver
2011-01-20 6:48 ` Felipe Balbi
@ 2011-01-20 7:03 ` Yang Ruirui
0 siblings, 0 replies; 3+ messages in thread
From: Yang Ruirui @ 2011-01-20 7:03 UTC (permalink / raw)
To: Felipe Balbi
Cc: Yang Ruirui R, Greg Kroah-Hartman, Hao Wu, Alan Cox, Alek Du,
linux-usb, linux-kernel
On Thu, Jan 20, 2011 at 08:48:29AM +0200, Felipe Balbi wrote:
> Hi,
>
> On Thu, Jan 20, 2011 at 02:50:40PM +0800, Yang Ruirui wrote:
> > Use notifier chain in otg_transceiver instead of own notifier chain.
> >
> > This patch depends on another patch which change otg_transceiver
> > notifier chain to atomic, please see:
> > https://lkml.org/lkml/2011/1/19/72
>
> (just one point, try to break commit logs at 72 characters next time,
> not sure if Greg will ask you to resend, if he does, you can add the
> Reviewed-by line below)
Thank you for pointing out this. I will resend before he ask:)
>
> > Signed-off-by: Yang Ruirui <ruirui.r.yang@tieto.com>
>
> I have checked that nobody actually uses
> intel_mid_otg_register_notifier() thus:
>
> Reviewed-by: Felipe Balbi <balbi@ti.com>
>
> --
> balbi
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-01-20 6:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-20 6:50 [PATCH] usb langwell otg: use notifier chain of struct otg_transceiver Yang Ruirui
2011-01-20 6:48 ` Felipe Balbi
2011-01-20 7:03 ` Yang Ruirui
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).