Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 721002ec authored by Kishon Vijay Abraham I's avatar Kishon Vijay Abraham I Committed by Felipe Balbi
Browse files

usb: otg: utils: rename function name in OTG utils



_transceiver() in otg.c is replaced with _phy. usb_set_transceiver is
replaced with usb_add_phy to make it similar to other usb standard
function names like usb_add_hcd.

Signed-off-by: default avatarKishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 6b03b133
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -2517,7 +2517,7 @@ static int __devexit ab8500_charger_remove(struct platform_device *pdev)
		dev_err(di->dev, "%s mask and set failed\n", __func__);

	usb_unregister_notifier(di->usb_phy, &di->nb);
	usb_put_transceiver(di->usb_phy);
	usb_put_phy(di->usb_phy);

	/* Delete the work queue */
	destroy_workqueue(di->charger_wq);
@@ -2688,7 +2688,7 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev)
		goto free_ac;
	}

	di->usb_phy = usb_get_transceiver();
	di->usb_phy = usb_get_phy();
	if (!di->usb_phy) {
		dev_err(di->dev, "failed to get usb transceiver\n");
		ret = -EINVAL;
@@ -2747,7 +2747,7 @@ static int __devinit ab8500_charger_probe(struct platform_device *pdev)
		free_irq(irq, di);
	}
put_usb_phy:
	usb_put_transceiver(di->usb_phy);
	usb_put_phy(di->usb_phy);
free_usb:
	power_supply_unregister(&di->usb_chg.psy);
free_ac:
+3 −3
Original line number Diff line number Diff line
@@ -415,7 +415,7 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev)
	if (!isp)
		return -ENOMEM;

	isp->phy = usb_get_transceiver();
	isp->phy = usb_get_phy();
	if (!isp->phy)
		goto fail0;

@@ -475,7 +475,7 @@ static int __devinit isp1704_charger_probe(struct platform_device *pdev)
	power_supply_unregister(&isp->psy);
fail1:
	isp1704_charger_set_power(isp, 0);
	usb_put_transceiver(isp->phy);
	usb_put_phy(isp->phy);
fail0:
	kfree(isp);

@@ -490,7 +490,7 @@ static int __devexit isp1704_charger_remove(struct platform_device *pdev)

	usb_unregister_notifier(isp->phy, &isp->nb);
	power_supply_unregister(&isp->psy);
	usb_put_transceiver(isp->phy);
	usb_put_phy(isp->phy);
	isp1704_charger_set_power(isp, 0);
	kfree(isp);

+3 −3
Original line number Diff line number Diff line
@@ -321,7 +321,7 @@ static int pda_power_probe(struct platform_device *pdev)
	}

#ifdef CONFIG_USB_OTG_UTILS
	transceiver = usb_get_transceiver();
	transceiver = usb_get_phy();
	if (transceiver && !pdata->is_usb_online) {
		pdata->is_usb_online = otg_is_usb_online;
	}
@@ -409,7 +409,7 @@ static int pda_power_probe(struct platform_device *pdev)
		free_irq(ac_irq->start, &pda_psy_ac);
#ifdef CONFIG_USB_OTG_UTILS
	if (transceiver)
		usb_put_transceiver(transceiver);
		usb_put_phy(transceiver);
#endif
ac_irq_failed:
	if (pdata->is_ac_online)
@@ -444,7 +444,7 @@ static int pda_power_remove(struct platform_device *pdev)
		power_supply_unregister(&pda_psy_ac);
#ifdef CONFIG_USB_OTG_UTILS
	if (transceiver)
		usb_put_transceiver(transceiver);
		usb_put_phy(transceiver);
#endif
	if (ac_draw) {
		regulator_put(ac_draw);
+3 −3
Original line number Diff line number Diff line
@@ -479,7 +479,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev)

	INIT_WORK(&bci->work, twl4030_bci_usb_work);

	bci->transceiver = usb_get_transceiver();
	bci->transceiver = usb_get_phy();
	if (bci->transceiver != NULL) {
		bci->usb_nb.notifier_call = twl4030_bci_usb_ncb;
		usb_register_notifier(bci->transceiver, &bci->usb_nb);
@@ -509,7 +509,7 @@ static int __init twl4030_bci_probe(struct platform_device *pdev)
fail_unmask_interrupts:
	if (bci->transceiver != NULL) {
		usb_unregister_notifier(bci->transceiver, &bci->usb_nb);
		usb_put_transceiver(bci->transceiver);
		usb_put_phy(bci->transceiver);
	}
	free_irq(bci->irq_bci, bci);
fail_bci_irq:
@@ -540,7 +540,7 @@ static int __exit twl4030_bci_remove(struct platform_device *pdev)

	if (bci->transceiver != NULL) {
		usb_unregister_notifier(bci->transceiver, &bci->usb_nb);
		usb_put_transceiver(bci->transceiver);
		usb_put_phy(bci->transceiver);
	}
	free_irq(bci->irq_bci, bci);
	free_irq(bci->irq_chg, bci);
+4 −4
Original line number Diff line number Diff line
@@ -1687,7 +1687,7 @@ static int udc_start(struct ci13xxx *udc)

	udc->gadget.ep0 = &udc->ep0in->ep;

	udc->transceiver = usb_get_transceiver();
	udc->transceiver = usb_get_phy();

	if (udc->udc_driver->flags & CI13XXX_REQUIRE_TRANSCEIVER) {
		if (udc->transceiver == NULL) {
@@ -1731,7 +1731,7 @@ static int udc_start(struct ci13xxx *udc)
remove_trans:
	if (udc->transceiver) {
		otg_set_peripheral(udc->transceiver->otg, &udc->gadget);
		usb_put_transceiver(udc->transceiver);
		usb_put_phy(udc->transceiver);
	}

	dev_err(dev, "error = %i\n", retval);
@@ -1741,7 +1741,7 @@ static int udc_start(struct ci13xxx *udc)
	device_unregister(&udc->gadget.dev);
put_transceiver:
	if (udc->transceiver)
		usb_put_transceiver(udc->transceiver);
		usb_put_phy(udc->transceiver);
free_pools:
	dma_pool_destroy(udc->td_pool);
free_qh_pool:
@@ -1774,7 +1774,7 @@ static void udc_stop(struct ci13xxx *udc)

	if (udc->transceiver) {
		otg_set_peripheral(udc->transceiver->otg, NULL);
		usb_put_transceiver(udc->transceiver);
		usb_put_phy(udc->transceiver);
	}
	dbg_remove_files(&udc->gadget.dev);
	device_unregister(&udc->gadget.dev);
Loading