* [PATCH] irda: convert pxaficp device to net_device_ops
@ 2009-04-18 13:44 Dmitry Eremin-Solenikov
2009-04-19 10:25 ` Jiri Pirko
0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Eremin-Solenikov @ 2009-04-18 13:44 UTC (permalink / raw)
To: samuel; +Cc: netdev, David S. Miller, Dmitry Eremin-Solenikov
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
---
drivers/net/irda/pxaficp_ir.c | 13 +++++++++----
1 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index e775338..743952d 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -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);
--
1.6.2.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] irda: convert pxaficp device to net_device_ops
2009-04-18 13:44 [PATCH] irda: convert pxaficp device to net_device_ops Dmitry Eremin-Solenikov
@ 2009-04-19 10:25 ` Jiri Pirko
2009-04-20 10:06 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Jiri Pirko @ 2009-04-19 10:25 UTC (permalink / raw)
To: Dmitry Eremin-Solenikov; +Cc: samuel, netdev, David S. Miller
Sat, Apr 18, 2009 at 03:44:26PM CEST, dbaryshkov@gmail.com wrote:
>Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
>---
> drivers/net/irda/pxaficp_ir.c | 13 +++++++++----
> 1 files changed, 9 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
>index e775338..743952d 100644
>--- a/drivers/net/irda/pxaficp_ir.c
>+++ b/drivers/net/irda/pxaficp_ir.c
>@@ -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,
>+};
>+
>+
Patch looks, only little nitpick - why two blank lines here ^ ?
> 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);
>
>--
>1.6.2.1
>
>--
>To unsubscribe from this list: send the line "unsubscribe netdev" in
>the body of a message to majordomo@vger.kernel.org
>More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] irda: convert pxaficp device to net_device_ops
2009-04-19 10:25 ` Jiri Pirko
@ 2009-04-20 10:06 ` David Miller
0 siblings, 0 replies; 3+ messages in thread
From: David Miller @ 2009-04-20 10:06 UTC (permalink / raw)
To: jpirko; +Cc: dbaryshkov, samuel, netdev
From: Jiri Pirko <jpirko@redhat.com>
Date: Sun, 19 Apr 2009 12:25:41 +0200
> Sat, Apr 18, 2009 at 03:44:26PM CEST, dbaryshkov@gmail.com wrote:
>>Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
...
> Patch looks, only little nitpick - why two blank lines here ^ ?
Also, net-next-2.6 already has this driver converted.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-04-20 10:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-18 13:44 [PATCH] irda: convert pxaficp device to net_device_ops Dmitry Eremin-Solenikov
2009-04-19 10:25 ` Jiri Pirko
2009-04-20 10:06 ` David Miller
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).