diff options
Diffstat (limited to 'drivers/usb/gadget/u_ether.c')
-rw-r--r-- | drivers/usb/gadget/u_ether.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/u_ether.c index 2fc02bd95848..07f4178ad178 100644 --- a/drivers/usb/gadget/u_ether.c +++ b/drivers/usb/gadget/u_ether.c | |||
@@ -23,6 +23,7 @@ | |||
23 | /* #define VERBOSE_DEBUG */ | 23 | /* #define VERBOSE_DEBUG */ |
24 | 24 | ||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/gfp.h> | ||
26 | #include <linux/device.h> | 27 | #include <linux/device.h> |
27 | #include <linux/ctype.h> | 28 | #include <linux/ctype.h> |
28 | #include <linux/etherdevice.h> | 29 | #include <linux/etherdevice.h> |
@@ -746,6 +747,10 @@ static const struct net_device_ops eth_netdev_ops = { | |||
746 | .ndo_validate_addr = eth_validate_addr, | 747 | .ndo_validate_addr = eth_validate_addr, |
747 | }; | 748 | }; |
748 | 749 | ||
750 | static struct device_type gadget_type = { | ||
751 | .name = "gadget", | ||
752 | }; | ||
753 | |||
749 | /** | 754 | /** |
750 | * gether_setup - initialize one ethernet-over-usb link | 755 | * gether_setup - initialize one ethernet-over-usb link |
751 | * @g: gadget to associated with these links | 756 | * @g: gadget to associated with these links |
@@ -808,6 +813,7 @@ int __init gether_setup(struct usb_gadget *g, u8 ethaddr[ETH_ALEN]) | |||
808 | 813 | ||
809 | dev->gadget = g; | 814 | dev->gadget = g; |
810 | SET_NETDEV_DEV(net, &g->dev); | 815 | SET_NETDEV_DEV(net, &g->dev); |
816 | SET_NETDEV_DEVTYPE(net, &gadget_type); | ||
811 | 817 | ||
812 | status = register_netdev(net); | 818 | status = register_netdev(net); |
813 | if (status < 0) { | 819 | if (status < 0) { |