diff mbox

[v2,bluetooth-next] cc2520: set the default fifo pin value from platform data

Message ID 1439260985-5173-1-git-send-email-sdliyong@gmail.com
State Awaiting Upstream, archived
Delegated to: David Miller
Headers show

Commit Message

LIYONG Aug. 11, 2015, 2:43 a.m. UTC
From: Yong Li <sdliyong@gmail.com>

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>
---
 drivers/net/ieee802154/cc2520.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Varka Bhadram Aug. 11, 2015, 3:18 a.m. UTC | #1
On 08/11/2015 08:13 AM, sdliyong@gmail.com wrote:
> From: Yong Li <sdliyong@gmail.com>
>
> 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>

> ---
>   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;
>   	}
>
Marcel Holtmann Aug. 11, 2015, 4:14 a.m. UTC | #2
Hi Yong,

> 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>
> ---
> drivers/net/ieee802154/cc2520.c | 1 +
> 1 file changed, 1 insertion(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;
 	}