mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-27 11:19:37 +00:00
net: wireless: wl1251: 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: Jingoo Han <jg1.han@samsung.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5743756161
commit
c49b05ac2c
1 changed files with 2 additions and 2 deletions
|
@ -257,7 +257,7 @@ static int wl1251_spi_probe(struct spi_device *spi)
|
|||
wl = hw->priv;
|
||||
|
||||
SET_IEEE80211_DEV(hw, &spi->dev);
|
||||
dev_set_drvdata(&spi->dev, wl);
|
||||
spi_set_drvdata(spi, wl);
|
||||
wl->if_priv = spi;
|
||||
wl->if_ops = &wl1251_spi_ops;
|
||||
|
||||
|
@ -311,7 +311,7 @@ static int wl1251_spi_probe(struct spi_device *spi)
|
|||
|
||||
static int wl1251_spi_remove(struct spi_device *spi)
|
||||
{
|
||||
struct wl1251 *wl = dev_get_drvdata(&spi->dev);
|
||||
struct wl1251 *wl = spi_get_drvdata(spi);
|
||||
|
||||
free_irq(wl->irq, wl);
|
||||
wl1251_free_hw(wl);
|
||||
|
|
Loading…
Reference in a new issue