Thread (15 messages) 15 messages, 6 authors, 2019-11-01

Re: [PATCH 3/5] net: stmmac: pci: Add Loongson GMAC

From: Bjorn Helgaas <helgaas@kernel.org>
Date: 2019-10-30 20:37:02
Also in: linux-devicetree, linux-ide, linux-mips, linux-pci

On Wed, Oct 30, 2019 at 09:53:45PM +0800, Jiaxun Yang wrote:
This device will be setup by parsing DeviceTree node
of pci device.

Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
+static int loongson_pci_of_setup(struct pci_dev *pdev,
+			struct plat_stmmacenet_data *plat)
+{
+	struct device_node  *np;
+	np = pci_device_to_OF_node(pdev);
+
+	if(!np) {
Please pay attention to the existing coding style in the file and
follow it.  In this and other cases below, add a space in "if (".
+	if(!of_device_is_compatible(np, "loongson,pci-gmac")) {
+	return  stmmac_parse_config_dt(np, plat);
Remove the double space here.
+	if(info->of_irq) {
+	STMMAC_DEVICE(LOONGSON,  PCI_DEVICE_ID_LOONGSON_GMAC, loongson_of_pci_info),
And here.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help