]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
phonet: update to net_device_ops
authorStephen Hemminger <shemminger@vyatta.com>
Thu, 8 Jan 2009 01:24:34 +0000 (17:24 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Jan 2009 01:24:34 +0000 (17:24 -0800)
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/usb/gadget/f_phonet.c
net/phonet/pep-gprs.c

index d8fc9b32fe3682c52b9ad060fa3862a6ab557143..c0916c7b217e406a2fd91966eed9463bf3b829ae 100644 (file)
@@ -279,6 +279,13 @@ static int pn_net_mtu(struct net_device *dev, int new_mtu)
        return err;
 }
 
+static const struct net_device_ops pn_netdev_ops = {
+       .ndo_open       = pn_net_open,
+       .ndo_stop       = pn_net_close,
+       .ndo_start_xmit = pn_net_xmit,
+       .ndo_change_mtu = pn_net_mtu,
+};
+
 static void pn_net_setup(struct net_device *dev)
 {
        dev->features           = 0;
@@ -290,12 +297,9 @@ static void pn_net_setup(struct net_device *dev)
        dev->addr_len           = 1;
        dev->tx_queue_len       = 1;
 
+       dev->netdev_ops         = &pn_netdev_ops;
        dev->destructor         = free_netdev;
        dev->header_ops         = &phonet_header_ops;
-       dev->open               = pn_net_open;
-       dev->stop               = pn_net_close;
-       dev->hard_start_xmit    = pn_net_xmit; /* mandatory */
-       dev->change_mtu         = pn_net_mtu;
 }
 
 /*-------------------------------------------------------------------------*/
index b0ceac2d6cd1022d568c48efd85ede0568882da8..6a91a32a80c135277fdae3f0b67572d5df2f92b6 100644 (file)
@@ -227,6 +227,13 @@ static int gprs_set_mtu(struct net_device *dev, int new_mtu)
        return 0;
 }
 
+static const struct net_device_ops gprs_netdev_ops = {
+       .ndo_open       = gprs_open,
+       .ndo_stop       = gprs_close,
+       .ndo_start_xmit = gprs_xmit,
+       .ndo_change_mtu = gprs_set_mtu,
+};
+
 static void gprs_setup(struct net_device *dev)
 {
        dev->features           = NETIF_F_FRAGLIST;
@@ -237,11 +244,8 @@ static void gprs_setup(struct net_device *dev)
        dev->addr_len           = 0;
        dev->tx_queue_len       = 10;
 
+       dev->netdev_ops         = &gprs_netdev_ops;
        dev->destructor         = free_netdev;
-       dev->open               = gprs_open;
-       dev->stop               = gprs_close;
-       dev->hard_start_xmit    = gprs_xmit; /* mandatory */
-       dev->change_mtu         = gprs_set_mtu;
 }
 
 /*