USB: otg: add otg_put_transceiver()

As Russell King points out, calling put_device(otg_transceiver->dev)
directly in driver cleanup paths makes assumptions about otg_transceiver
internals.

Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Philipp Zabel
2008-11-24 12:01:17 -08:00
committed by Greg Kroah-Hartman
parent 6084f1bf0c
commit 68144e0cc9
3 changed files with 9 additions and 2 deletions

View File

@@ -96,6 +96,12 @@ struct otg_transceiver *otg_get_transceiver(void)
}
EXPORT_SYMBOL(otg_get_transceiver);
void otg_put_transceiver(struct otg_transceiver *x)
{
put_device(x->dev);
}
EXPORT_SYMBOL(otg_put_transceiver);
int otg_set_transceiver(struct otg_transceiver *x)
{
if (xceiv && x)