Thread (24 messages) 24 messages, 3 authors, 2018-02-16

Re: [PATCH net v4 06/13] net/mac89x0: Convert to platform_driver

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2018-02-12 08:25:59
Also in: linux-m68k, lkml

On Mon, Feb 12, 2018 at 4:08 AM, Finn Thain [off-list ref] wrote:
Apparently these Dayna cards don't have a pseudoslot declaration ROM
which means they can't be probed like NuBus cards.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Finn Thain <redacted>
---
 arch/m68k/mac/config.c                |  4 ++
 drivers/net/Space.c                   |  3 --
 drivers/net/ethernet/cirrus/mac89x0.c | 69 ++++++++++++++++-------------------
 include/net/Space.h                   |  1 -
 4 files changed, 35 insertions(+), 42 deletions(-)
For the m68k part:
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
quoted hunk ↗ jump to hunk
--- a/drivers/net/ethernet/cirrus/mac89x0.c
+++ b/drivers/net/ethernet/cirrus/mac89x0.c
quoted hunk ↗ jump to hunk
@@ -167,10 +172,9 @@ static const struct net_device_ops mac89x0_netdev_ops = {

 /* Probe for the CS8900 card in slot E.  We won't bother looking
    anywhere else until we have a really good reason to do so. */
-struct net_device * __init mac89x0_probe(int unit)
+static int mac89x0_device_probe(struct platform_device *pdev)
 {
        struct net_device *dev;
-       static int once_is_enough;
        struct net_local *lp;
        static unsigned version_printed;
        int i, slot;
@@ -181,20 +185,13 @@ struct net_device * __init mac89x0_probe(int unit)
        struct nubus_rsrc *fres;

        if (!MACH_IS_MAC)
-               return ERR_PTR(-ENODEV);
+               return -ENODEV;
I think this check can be removed completely, as the platform device will
exist on suitable Macs only.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help