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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 12, 2018 at 4:08 AM, Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxx>
Signed-off-by: Finn Thain <fthain@xxxxxxxxxxxxxxxxxxx>
---
 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@xxxxxxxxxxxxxx>

--- a/drivers/net/ethernet/cirrus/mac89x0.c
+++ b/drivers/net/ethernet/cirrus/mac89x0.c

@@ -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@xxxxxxxxxxxxxx

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
--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux