Skip to content

Commit

Permalink
wifi: wl1251: drop support for platform data
Browse files Browse the repository at this point in the history
There are no users of wl1251_platform_data left in the mainline kernel,
so let's remove it.

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
dtor authored and intel-lab-lkp committed Sep 28, 2022
1 parent a1cb097 commit 2d135eb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 98 deletions.
35 changes: 0 additions & 35 deletions drivers/net/wireless/ti/wilink_platform_data.c

This file was deleted.

8 changes: 1 addition & 7 deletions drivers/net/wireless/ti/wl1251/sdio.c
Expand Up @@ -12,7 +12,6 @@
#include <linux/mmc/sdio_func.h>
#include <linux/mmc/sdio_ids.h>
#include <linux/platform_device.h>
#include <linux/wl12xx.h>
#include <linux/irq.h>
#include <linux/pm_runtime.h>
#include <linux/of.h>
Expand Down Expand Up @@ -197,7 +196,6 @@ static int wl1251_sdio_probe(struct sdio_func *func,
struct wl1251 *wl;
struct ieee80211_hw *hw;
struct wl1251_sdio *wl_sdio;
const struct wl1251_platform_data *wl1251_board_data;
struct device_node *np = func->dev.of_node;

hw = wl1251_alloc_hw();
Expand Down Expand Up @@ -225,11 +223,7 @@ static int wl1251_sdio_probe(struct sdio_func *func,
wl->if_priv = wl_sdio;
wl->if_ops = &wl1251_sdio_ops;

wl1251_board_data = wl1251_get_platform_data();
if (!IS_ERR(wl1251_board_data)) {
wl->irq = wl1251_board_data->irq;
wl->use_eeprom = wl1251_board_data->use_eeprom;
} else if (np) {
if (np) {
wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom");
wl->irq = of_irq_get(np, 0);
if (wl->irq == -EPROBE_DEFER) {
Expand Down
15 changes: 3 additions & 12 deletions drivers/net/wireless/ti/wl1251/spi.c
Expand Up @@ -12,7 +12,6 @@
#include <linux/swab.h>
#include <linux/crc7.h>
#include <linux/spi/spi.h>
#include <linux/wl12xx.h>
#include <linux/gpio.h>
#include <linux/of.h>
#include <linux/of_gpio.h>
Expand Down Expand Up @@ -226,16 +225,13 @@ static const struct wl1251_if_operations wl1251_spi_ops = {

static int wl1251_spi_probe(struct spi_device *spi)
{
struct wl1251_platform_data *pdata = dev_get_platdata(&spi->dev);
struct device_node *np = spi->dev.of_node;
struct ieee80211_hw *hw;
struct wl1251 *wl;
int ret;

if (!np && !pdata) {
wl1251_error("no platform data");
if (!np)
return -ENODEV;
}

hw = wl1251_alloc_hw();
if (IS_ERR(hw))
Expand All @@ -259,14 +255,9 @@ static int wl1251_spi_probe(struct spi_device *spi)
goto out_free;
}

if (np) {
wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom");
wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0);
} else if (pdata) {
wl->power_gpio = pdata->power_gpio;
wl->use_eeprom = pdata->use_eeprom;
}
wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom");

wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0);
if (wl->power_gpio == -EPROBE_DEFER) {
ret = -EPROBE_DEFER;
goto out_free;
Expand Down
44 changes: 0 additions & 44 deletions include/linux/wl12xx.h

This file was deleted.

0 comments on commit 2d135eb

Please sign in to comment.