cc2520: set the default fifo pin value from platform data

This change “cc2520: set the default fifo pin value from platform data” in Linux kernel is authored by Yong Li <sdliyong [at] gmail.com> on Tue Aug 11 10:43:05 2015 +0800.

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>

This Linux change may have been applied to various maintained Linux releases and you can find Linux releases including commit 8599822.

There is one line of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/net/ieee802154/cc2520.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ieee802154/cc2520.c b/drivers/net/ieee802154/cc2520.c
index 613dae5..c5b54a1 100644
--- a/drivers/net/ieee802154/cc2520.c
+++ b/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;
 	}
 

The commit for this change in Linux stable tree is 8599822 (patch).

Leave a Reply

Your email address will not be published. Required fields are marked *