Skip to contentSkip to conversation

irda: convert pxaficp device to net_device_ops

PATCH In review Dmitry Eremin-Solenikov 3 participants 3 messages Apr 18, 2009 – Apr 20, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 irda: convert pxaficp device to net_device_ops

---
 drivers/net/irda/pxaficp_ir.c |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
drivers/net/irda/pxaficp_ir.c +9 -4
index e775338..743952d 100644
@@ -797,6 +797,14 @@ static int pxa_irda_init_iobuf(iobuff_t *io, int size)
 	return io->head ? 0 : -ENOMEM;
 }
 
+static const struct net_device_ops pxa_irda_ops = {
+	.ndo_start_xmit = pxa_irda_hard_xmit,
+	.ndo_open	= pxa_irda_start,
+	.ndo_stop	= pxa_irda_stop,
+	.ndo_do_ioctl	= pxa_irda_ioctl,
+};
+
+
 static int pxa_irda_probe(struct platform_device *pdev)
 {
 	struct net_device *dev;
@@ -845,10 +853,7 @@ static int pxa_irda_probe(struct platform_device *pdev)
 	if (err)
 		goto err_startup;
 
-	dev->hard_start_xmit	= pxa_irda_hard_xmit;
-	dev->open		= pxa_irda_start;
-	dev->stop		= pxa_irda_stop;
-	dev->do_ioctl		= pxa_irda_ioctl;
+	dev->netdev_ops = &pxa_irda_ops;
 
 	irda_init_max_qos_capabilies(&si->qos);
 
Signature · 1 line
1.6.2.1
#1 lore raw
Quoted 11 lines · Sat, Apr 18, 2009 at 03:44:26PM CEST, [email protected] wrote:

---
drivers/net/irda/pxaficp_ir.c | 13 +++++++++----

1 files changed, 9 insertions(+), 4 deletions(-)
drivers/net/irda/pxaficp_ir.c +0 -0
index e775338..743952d 100644
@@ -797,6 +797,14 @@ static int pxa_irda_init_iobuf(iobuff_t *io, int size)
 	return io->head ? 0 : -ENOMEM;

drivers/net/irda/pxaficp_ir.c static int pxa_irda_init_iobuf(iobuff_t *io, int size) · line 807

Quoted 10 lines
drivers/net/irda/pxaficp_ir.c +8 -0
 }
 
+static const struct net_device_ops pxa_irda_ops = {
+	.ndo_start_xmit = pxa_irda_hard_xmit,
+	.ndo_open	= pxa_irda_start,
+	.ndo_stop	= pxa_irda_stop,
+	.ndo_do_ioctl	= pxa_irda_ioctl,
+};
+
+

Patch looks, only little nitpick - why two blank lines here ^ ?

Quoted 22 lines
drivers/net/irda/pxaficp_ir.c +1 -4
 static int pxa_irda_probe(struct platform_device *pdev)
 {
 	struct net_device *dev;
@@ -845,10 +853,7 @@ static int pxa_irda_probe(struct platform_device *pdev)
 	if (err)
 		goto err_startup;
 
-	dev->hard_start_xmit	= pxa_irda_hard_xmit;
-	dev->open		= pxa_irda_start;
-	dev->stop		= pxa_irda_stop;
-	dev->do_ioctl		= pxa_irda_ioctl;
+	dev->netdev_ops = &pxa_irda_ops;
 
 	irda_init_max_qos_capabilies(&si->qos);
 
Signature · 6 lines
1.6.2.1

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html