[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190227132352.GI3809@lunn.ch>
Date: Wed, 27 Feb 2019 14:23:52 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Tristram.Ha@...rochip.com
Cc: Florian Fainelli <f.fainelli@...il.com>,
Pavel Machek <pavel@....cz>, UNGLinuxDriver@...rochip.com,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next 3/3] net: dsa: microchip: add other KSZ9477
switch variants
> + if (dev->dev->of_node) {
> + char name[80];
> +
> + /* KSZ8565 chip can only be set through device tree. */
> + if (!of_modalias_node(dev->dev->of_node, name, sizeof(name))) {
> + if (!strcmp(name, "ksz8565")) {
> + chip = KSZ8565_SW_CHIP;
> + id_hi = FAMILY_ID_98;
> + id_lo = 0x95;
> + }
> + }
of_device_is_compatible() seems like a better call use use.
Andrew
Powered by blists - more mailing lists