[PATCH v2 8/8] usb/gadget: f_phonet: remove compatibility layer

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There are no old function interface users left, so the old interface
can be removed.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@xxxxxxxxxxx>
Signed-off-by: Kyungmin Park <kyungmin.park@xxxxxxxxxxx>
---
 drivers/usb/gadget/f_phonet.c |   63 ++--------------------------------------
 1 files changed, 4 insertions(+), 59 deletions(-)

diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/f_phonet.c
index 02b2270..b921d65 100644
--- a/drivers/usb/gadget/f_phonet.c
+++ b/drivers/usb/gadget/f_phonet.c
@@ -560,55 +560,6 @@ err:
 	return status;
 }
 
-#ifdef USBF_PHONET_INCLUDED
-
-static void
-pn_old_unbind(struct usb_configuration *c, struct usb_function *f)
-{
-	struct f_phonet *fp = func_to_pn(f);
-	int i;
-
-	/* We are already disconnected */
-	if (fp->in_req)
-		usb_ep_free_request(fp->in_ep, fp->in_req);
-	for (i = 0; i < phonet_rxq_size; i++)
-		if (fp->out_reqv[i])
-			usb_ep_free_request(fp->out_ep, fp->out_reqv[i]);
-
-	usb_free_all_descriptors(f);
-	kfree(fp);
-}
-
-/*-------------------------------------------------------------------------*/
-
-int __init phonet_bind_config(struct usb_configuration *c,
-			      struct net_device *dev)
-{
-	struct f_phonet *fp;
-	int err, size;
-
-	size = sizeof(*fp) + (phonet_rxq_size * sizeof(struct usb_request *));
-	fp = kzalloc(size, GFP_KERNEL);
-	if (!fp)
-		return -ENOMEM;
-
-	fp->dev = dev;
-	fp->function.name = "phonet";
-	fp->function.bind = pn_bind;
-	fp->function.unbind = pn_old_unbind;
-	fp->function.set_alt = pn_set_alt;
-	fp->function.get_alt = pn_get_alt;
-	fp->function.disable = pn_disconnect;
-	spin_lock_init(&fp->rx.lock);
-
-	err = usb_add_function(c, &fp->function);
-	if (err)
-		kfree(fp);
-	return err;
-}
-
-#else
-
 static void phonet_free_inst(struct usb_function_instance *f)
 {
 	struct f_phonet_opts *opts;
@@ -679,12 +630,6 @@ struct usb_function *phonet_alloc(struct usb_function_instance *fi)
 	return &fp->function;
 }
 
-DECLARE_USB_FUNCTION_INIT(phonet, phonet_alloc_inst, phonet_alloc);
-MODULE_AUTHOR("Rémi Denis-Courmont");
-MODULE_LICENSE("GPL");
-
-#endif
-
 struct net_device *gphonet_setup(struct usb_gadget *gadget)
 {
 	struct net_device *dev;
@@ -709,14 +654,14 @@ struct net_device *gphonet_setup(struct usb_gadget *gadget)
 	}
 	return dev;
 }
-#ifndef USBF_PHONET_INCLUDED
 EXPORT_SYMBOL(gphonet_setup);
-#endif
 
 void gphonet_cleanup(struct net_device *dev)
 {
 	unregister_netdev(dev);
 }
-#ifndef USBF_PHONET_INCLUDED
 EXPORT_SYMBOL(gphonet_cleanup);
-#endif
+
+DECLARE_USB_FUNCTION_INIT(phonet, phonet_alloc_inst, phonet_alloc);
+MODULE_AUTHOR("Rémi Denis-Courmont");
+MODULE_LICENSE("GPL");
-- 
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux