netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: [patch 09/30] tokenring: convert drivers to net_device_ops
Date: Thu, 26 Mar 2009 18:11:23 -0700	[thread overview]
Message-ID: <20090327011255.602662418@linux-foundation.org> (raw)
In-Reply-To: 20090327011114.169107105@linux-foundation.org

[-- Attachment #1: tr-netdev.patch --]
[-- Type: text/plain, Size: 3101 bytes --]

Convert madge and proteon drivers which are really just subclasses
of tms380.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>


--- a/drivers/net/tokenring/madgemc.c	2009-03-26 15:07:42.000000000 -0700
+++ b/drivers/net/tokenring/madgemc.c	2009-03-26 15:29:50.091370340 -0700
@@ -142,7 +142,7 @@ static void madgemc_sifwritew(struct net
 	return;
 }
 
-
+static struct net_device_ops madgemc_netdev_ops __read_mostly;
 
 static int __devinit madgemc_probe(struct device *device)
 {	
@@ -168,7 +168,7 @@ static int __devinit madgemc_probe(struc
 		goto getout;
 	}
 
-	dev->dma = 0;
+	dev->netdev_ops = &madgemc_netdev_ops;
 
 	card = kmalloc(sizeof(struct card_info), GFP_KERNEL);
 	if (card==NULL) {
@@ -348,9 +348,6 @@ static int __devinit madgemc_probe(struc
 
 	memcpy(tp->ProductID, "Madge MCA 16/4    ", PROD_ID_SIZE + 1);
 
-	dev->open = madgemc_open;
-	dev->stop = madgemc_close;
-
 	tp->tmspriv = card;
 	dev_set_drvdata(device, dev);
 
@@ -758,6 +755,10 @@ static struct mca_driver madgemc_driver 
 
 static int __init madgemc_init (void)
 {
+	madgemc_netdev_ops = tms380tr_netdev_ops;
+	madgemc_netdev_ops.ndo_open = madgemc_open;
+	madgemc_netdev_ops.ndo_stop = madgemc_close;
+
 	return mca_register_driver (&madgemc_driver);
 }
 
--- a/drivers/net/tokenring/proteon.c	2009-03-26 15:07:42.000000000 -0700
+++ b/drivers/net/tokenring/proteon.c	2009-03-26 15:19:12.931371862 -0700
@@ -116,6 +116,8 @@ nodev:
 	return -ENODEV;
 }
 
+static struct net_device_ops proteon_netdev_ops __read_mostly;
+
 static int __init setup_card(struct net_device *dev, struct device *pdev)
 {
 	struct net_local *tp;
@@ -167,8 +169,7 @@ static int __init setup_card(struct net_
 
 	tp->tmspriv = NULL;
 
-	dev->open = proteon_open;
-	dev->stop = tms380tr_close;
+	dev->netdev_ops = &proteon_netdev_ops;
 
 	if (dev->irq == 0)
 	{
@@ -352,6 +353,10 @@ static int __init proteon_init(void)
 	struct platform_device *pdev;
 	int i, num = 0, err = 0;
 
+	proteon_netdev_ops = tms380tr_netdev_ops;
+	proteon_netdev_ops.ndo_open = proteon_open;
+	proteon_netdev_ops.ndo_stop = tms380tr_close;
+
 	err = platform_driver_register(&proteon_driver);
 	if (err)
 		return err;
--- a/drivers/net/tokenring/skisa.c	2009-03-26 15:07:42.000000000 -0700
+++ b/drivers/net/tokenring/skisa.c	2009-03-26 15:19:47.558393173 -0700
@@ -133,6 +133,8 @@ static int __init sk_isa_probe1(struct n
 	return 0;
 }
 
+static struct net_device_ops sk_isa_netdev_ops __read_mostly;
+
 static int __init setup_card(struct net_device *dev, struct device *pdev)
 {
 	struct net_local *tp;
@@ -184,8 +186,7 @@ static int __init setup_card(struct net_
 
 	tp->tmspriv = NULL;
 
-	dev->open = sk_isa_open;
-	dev->stop = tms380tr_close;
+	dev->netdev_ops = &sk_isa_netdev_ops;
 
 	if (dev->irq == 0)
 	{
@@ -362,6 +363,10 @@ static int __init sk_isa_init(void)
 	struct platform_device *pdev;
 	int i, num = 0, err = 0;
 
+	sk_isa_netdev_ops = tms380tr_netdev_ops;
+	sk_isa_netdev_ops.ndo_open = sk_isa_open;
+	sk_isa_netdev_ops.ndo_stop = tms380tr_close;
+
 	err = platform_driver_register(&sk_isa_driver);
 	if (err)
 		return err;



  parent reply	other threads:[~2009-03-27  1:26 UTC|newest]

Thread overview: 63+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-27  1:11 [patch 00/30] last of the x86 net_device_ops Stephen Hemminger
2009-03-27  1:11 ` [patch 01/30] 3c503, smc-ultra: netdev_ops bugs Stephen Hemminger
2009-03-27  7:50   ` David Miller
2009-03-27  1:11 ` [patch 02/30] uml: convert network device to internal network device stats Stephen Hemminger
2009-03-27  7:50   ` David Miller
2009-03-27  1:11 ` [patch 03/30] uml: convert network device to netdevice ops Stephen Hemminger
2009-03-27  7:50   ` David Miller
2009-03-27  1:11 ` [patch 04/30] appletalk: convert cops to internal net_device_stats Stephen Hemminger
2009-03-27  7:50   ` David Miller
2009-03-27  1:11 ` [patch 05/30] To: acme@ghostprotocols.net Subjetct: appltetalk: convert cops device to net_device ops Stephen Hemminger
2009-03-27  7:50   ` [patch 05/30] " David Miller
2009-03-27  1:11 ` [patch 06/30] appletalk: convert LTPC to use internal net_device_stats Stephen Hemminger
2009-03-27  7:50   ` David Miller
2009-03-27  1:11 ` [patch 07/30] appletalk: convert LTPC to net_device_ops Stephen Hemminger
2009-03-27  7:50   ` David Miller
2009-03-27  1:11 ` [patch 08/30] IRDA: convert donauboe " Stephen Hemminger
2009-03-27  7:50   ` David Miller
2009-03-27  1:11 ` Stephen Hemminger [this message]
2009-03-27  7:50   ` [patch 09/30] tokenring: convert drivers " David Miller
2009-03-27  1:11 ` [patch 10/30] tokenring: convert smctr " Stephen Hemminger
2009-03-27  7:50   ` David Miller
2009-03-27  1:11 ` [patch 11/30] wan: convert sdla driver " Stephen Hemminger
2009-03-27  7:50   ` David Miller
2009-03-27  1:11 ` [patch 12/30] wireless: convert arlan " Stephen Hemminger
2009-03-27  7:51   ` David Miller
2009-03-27  1:11 ` [patch 13/30] wireless: convert wavelan " Stephen Hemminger
     [not found]   ` <20090327011255.886835267-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>
2009-03-27  7:51     ` David Miller
2009-03-27  1:11 ` [patch 14/30] netdev: seeq8005 convert " Stephen Hemminger
2009-03-27  7:51   ` David Miller
2009-03-27  1:11 ` [patch 15/30] netdev: smc9194 " Stephen Hemminger
2009-03-27  7:51   ` David Miller
2009-03-27  1:11 ` [patch 16/30] netdev: smc-ultra32 " Stephen Hemminger
2009-03-27  7:51   ` David Miller
2009-03-27  1:11 ` [patch 17/30] netdev: smc-ultra fix netpoll Stephen Hemminger
2009-03-27  7:51   ` David Miller
2009-03-27  1:11 ` [patch 18/30] lance: convert to net_device_ops Stephen Hemminger
2009-03-27  7:51   ` David Miller
2009-03-27  1:11 ` [patch 19/30] netdev: ibmlana " Stephen Hemminger
2009-03-27  7:51   ` David Miller
2009-03-27  1:11 ` [patch 20/30] netdev: convert eexpress " Stephen Hemminger
2009-03-27  7:51   ` David Miller
2009-03-27  1:11 ` [patch 21/30] netdev: convert eexpro " Stephen Hemminger
2009-03-27  7:51   ` David Miller
2009-03-27  1:11 ` [patch 22/30] netdev: convert at1700 " Stephen Hemminger
2009-03-27  7:51   ` David Miller
2009-03-27  7:52   ` David Miller
2009-03-27  1:11 ` [patch 23/30] netdev: convert depca " Stephen Hemminger
2009-03-27  7:52   ` David Miller
2009-03-27  1:11 ` [patch 24/30] netdev: convert ewrk3 " Stephen Hemminger
2009-03-27  7:52   ` David Miller
2009-03-27  1:11 ` [patch 25/30] netdev: convert ni52 " Stephen Hemminger
2009-03-27  7:52   ` David Miller
2009-03-27  1:11 ` [patch 26/30] netdev: convert ni65 " Stephen Hemminger
2009-03-27  7:52   ` David Miller
2009-03-27  1:11 ` [patch 27/30] netdev: convert ac3200 " Stephen Hemminger
2009-03-27  7:52   ` David Miller
2009-03-27  7:52   ` David Miller
2009-03-27  1:11 ` [patch 28/30] netdev: convert lp486e " Stephen Hemminger
2009-03-27  7:52   ` David Miller
2009-03-27  1:11 ` [patch 29/30] netdev: convert cs89x0 " Stephen Hemminger
2009-03-27  7:52   ` David Miller
2009-03-27  1:11 ` [patch 30/30] netdev: convert eth16i " Stephen Hemminger
2009-03-27  7:52   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090327011255.602662418@linux-foundation.org \
    --to=shemminger@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).