浏览代码

cc2520: set the default fifo pin value from platform data

When the device tree support is disabled, the fifo_pin is uninitialized,
this patch will set the fifo_pin value based on platform data

Signed-off-by: Yong Li <sdliyong@gmail.com>
Acked-by: Varka Bhadram <varkabhadram@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Yong Li 10 年之前
父节点
当前提交
8599822916
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      drivers/net/ieee802154/cc2520.c

+ 1 - 0
drivers/net/ieee802154/cc2520.c

@@ -833,6 +833,7 @@ static int cc2520_get_platform_data(struct spi_device *spi,
 		if (!spi_pdata)
 			return -ENOENT;
 		*pdata = *spi_pdata;
+		priv->fifo_pin = pdata->fifo;
 		return 0;
 	}