cc2520: set the default fifo pin value from platform data
authorYong Li <sdliyong@gmail.com>
Tue, 11 Aug 2015 02:43:05 +0000 (10:43 +0800)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 11 Aug 2015 04:13:39 +0000 (06:13 +0200)
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>
drivers/net/ieee802154/cc2520.c

index 613dae559925f947586f8f011aad315d0705866c..c5b54a15fc4cb2b59584a492a5b4a9bca190e687 100644 (file)
@@ -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;
        }