Commit d60c5d20 authored by Jingoo Han's avatar Jingoo Han Committed by David S. Miller

net: wireless: p54spi: use spi_get_drvdata() and spi_set_drvdata()

Use the wrapper functions for getting and setting the driver data using
spi_device instead of using dev_{get|set}_drvdata with &spi->dev, so we
can directly pass a struct spi_device.
Signed-off-by: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c49b05ac
...@@ -396,7 +396,7 @@ static int p54spi_rx(struct p54s_priv *priv) ...@@ -396,7 +396,7 @@ static int p54spi_rx(struct p54s_priv *priv)
static irqreturn_t p54spi_interrupt(int irq, void *config) static irqreturn_t p54spi_interrupt(int irq, void *config)
{ {
struct spi_device *spi = config; struct spi_device *spi = config;
struct p54s_priv *priv = dev_get_drvdata(&spi->dev); struct p54s_priv *priv = spi_get_drvdata(spi);
ieee80211_queue_work(priv->hw, &priv->work); ieee80211_queue_work(priv->hw, &priv->work);
...@@ -609,7 +609,7 @@ static int p54spi_probe(struct spi_device *spi) ...@@ -609,7 +609,7 @@ static int p54spi_probe(struct spi_device *spi)
priv = hw->priv; priv = hw->priv;
priv->hw = hw; priv->hw = hw;
dev_set_drvdata(&spi->dev, priv); spi_set_drvdata(spi, priv);
priv->spi = spi; priv->spi = spi;
spi->bits_per_word = 16; spi->bits_per_word = 16;
...@@ -685,7 +685,7 @@ static int p54spi_probe(struct spi_device *spi) ...@@ -685,7 +685,7 @@ static int p54spi_probe(struct spi_device *spi)
static int p54spi_remove(struct spi_device *spi) static int p54spi_remove(struct spi_device *spi)
{ {
struct p54s_priv *priv = dev_get_drvdata(&spi->dev); struct p54s_priv *priv = spi_get_drvdata(spi);
p54_unregister_common(priv->hw); p54_unregister_common(priv->hw);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment