> + 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