X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fappletalk%2Fdev.c;h=1237e208e246a5ebcce6d69f524749472c4d3b06;hb=5d8c397f304e1363f8ff9749b08172eb59e6534a;hp=76598445d84b1591279ea3467b68ebe119bb3684;hpb=1da177e4c3f41524e886b7f1b8a0c1fc7321cac2;p=linux-2.6 diff --git a/net/appletalk/dev.c b/net/appletalk/dev.c index 76598445d8..1237e208e2 100644 --- a/net/appletalk/dev.c +++ b/net/appletalk/dev.c @@ -19,7 +19,7 @@ static int ltalk_mac_addr(struct net_device *dev, void *addr) return -EINVAL; } -void ltalk_setup(struct net_device *dev) +static void ltalk_setup(struct net_device *dev) { /* Fill in the fields of the device structure with localtalk-generic values. */ @@ -40,4 +40,22 @@ void ltalk_setup(struct net_device *dev) dev->flags = IFF_BROADCAST|IFF_MULTICAST|IFF_NOARP; } -EXPORT_SYMBOL(ltalk_setup); + +/** + * alloc_ltalkdev - Allocates and sets up an localtalk device + * @sizeof_priv: Size of additional driver-private structure to be allocated + * for this localtalk device + * + * Fill in the fields of the device structure with localtalk-generic + * values. Basically does everything except registering the device. + * + * Constructs a new net device, complete with a private data area of + * size @sizeof_priv. A 32-byte (not bit) alignment is enforced for + * this private data area. + */ + +struct net_device *alloc_ltalkdev(int sizeof_priv) +{ + return alloc_netdev(sizeof_priv, "lt%d", ltalk_setup); +} +EXPORT_SYMBOL(alloc_ltalkdev);