* [PATCH 1/8] wireless: ath5k: use dev_get_platdata()
2013-09-10 8:49 [PATCH] wireless: use dev_get_platdata() Jingoo Han
@ 2013-09-10 8:51 ` Jingoo Han
2013-09-10 8:53 ` [PATCH 2/8] wireless: ath9k: " Jingoo Han
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jingoo Han @ 2013-09-10 8:51 UTC (permalink / raw)
To: 'John W. Linville'
Cc: linux-wireless, 'Jingoo Han', 'Jiri Slaby',
'Nick Kossifidis', 'Luis R. Rodriguez'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/wireless/ath/ath5k/ahb.c | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/ahb.c b/drivers/net/wireless/ath/ath5k/ahb.c
index e9bc9e6..79bffe1 100644
--- a/drivers/net/wireless/ath/ath5k/ahb.c
+++ b/drivers/net/wireless/ath/ath5k/ahb.c
@@ -37,12 +37,9 @@ ath5k_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data)
{
struct ath5k_hw *ah = common->priv;
struct platform_device *pdev = to_platform_device(ah->dev);
- struct ar231x_board_config *bcfg = pdev->dev.platform_data;
+ struct ar231x_board_config *bcfg = dev_get_platdata(&pdev->dev);
u16 *eeprom, *eeprom_end;
-
-
- bcfg = pdev->dev.platform_data;
eeprom = (u16 *) bcfg->radio;
eeprom_end = ((void *) bcfg->config) + BOARD_CONFIG_BUFSZ;
@@ -57,7 +54,7 @@ ath5k_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data)
int ath5k_hw_read_srev(struct ath5k_hw *ah)
{
struct platform_device *pdev = to_platform_device(ah->dev);
- struct ar231x_board_config *bcfg = pdev->dev.platform_data;
+ struct ar231x_board_config *bcfg = dev_get_platdata(&pdev->dev);
ah->ah_mac_srev = bcfg->devid;
return 0;
}
@@ -65,7 +62,7 @@ int ath5k_hw_read_srev(struct ath5k_hw *ah)
static int ath5k_ahb_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac)
{
struct platform_device *pdev = to_platform_device(ah->dev);
- struct ar231x_board_config *bcfg = pdev->dev.platform_data;
+ struct ar231x_board_config *bcfg = dev_get_platdata(&pdev->dev);
u8 *cfg_mac;
if (to_platform_device(ah->dev)->id == 0)
@@ -87,7 +84,7 @@ static const struct ath_bus_ops ath_ahb_bus_ops = {
/*Initialization*/
static int ath_ahb_probe(struct platform_device *pdev)
{
- struct ar231x_board_config *bcfg = pdev->dev.platform_data;
+ struct ar231x_board_config *bcfg = dev_get_platdata(&pdev->dev);
struct ath5k_hw *ah;
struct ieee80211_hw *hw;
struct resource *res;
@@ -96,7 +93,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
int ret = 0;
u32 reg;
- if (!pdev->dev.platform_data) {
+ if (!dev_get_platdata(&pdev->dev)) {
dev_err(&pdev->dev, "no platform data specified\n");
ret = -EINVAL;
goto err_out;
@@ -193,7 +190,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
static int ath_ahb_remove(struct platform_device *pdev)
{
- struct ar231x_board_config *bcfg = pdev->dev.platform_data;
+ struct ar231x_board_config *bcfg = dev_get_platdata(&pdev->dev);
struct ieee80211_hw *hw = platform_get_drvdata(pdev);
struct ath5k_hw *ah;
u32 reg;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 2/8] wireless: ath9k: use dev_get_platdata()
2013-09-10 8:49 [PATCH] wireless: use dev_get_platdata() Jingoo Han
2013-09-10 8:51 ` [PATCH 1/8] wireless: ath5k: " Jingoo Han
@ 2013-09-10 8:53 ` Jingoo Han
2013-09-10 8:54 ` [PATCH 3/8] wireless: brcmfmac: " Jingoo Han
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jingoo Han @ 2013-09-10 8:53 UTC (permalink / raw)
To: 'John W. Linville'
Cc: linux-wireless, 'Jingoo Han', 'Luis R. Rodriguez',
'Jouni Malinen', 'Vasanthakumar Thiagarajan',
'Senthil Balasubramanian'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/wireless/ath/ath9k/ahb.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ahb.c b/drivers/net/wireless/ath/ath9k/ahb.c
index 072e4b5..2dff276 100644
--- a/drivers/net/wireless/ath/ath9k/ahb.c
+++ b/drivers/net/wireless/ath/ath9k/ahb.c
@@ -54,7 +54,7 @@ static bool ath_ahb_eeprom_read(struct ath_common *common, u32 off, u16 *data)
struct platform_device *pdev = to_platform_device(sc->dev);
struct ath9k_platform_data *pdata;
- pdata = (struct ath9k_platform_data *) pdev->dev.platform_data;
+ pdata = dev_get_platdata(&pdev->dev);
if (off >= (ARRAY_SIZE(pdata->eeprom_data))) {
ath_err(common,
"%s: flash read failed, offset %08x is out of range\n",
@@ -84,7 +84,7 @@ static int ath_ahb_probe(struct platform_device *pdev)
struct ath_hw *ah;
char hw_name[64];
- if (!pdev->dev.platform_data) {
+ if (!dev_get_platdata(&pdev->dev)) {
dev_err(&pdev->dev, "no platform data specified\n");
return -EINVAL;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 3/8] wireless: brcmfmac: use dev_get_platdata()
2013-09-10 8:49 [PATCH] wireless: use dev_get_platdata() Jingoo Han
2013-09-10 8:51 ` [PATCH 1/8] wireless: ath5k: " Jingoo Han
2013-09-10 8:53 ` [PATCH 2/8] wireless: ath9k: " Jingoo Han
@ 2013-09-10 8:54 ` Jingoo Han
2013-09-10 8:55 ` [PATCH 4/8] wireless: cw1200: " Jingoo Han
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jingoo Han @ 2013-09-10 8:54 UTC (permalink / raw)
To: 'John W. Linville'
Cc: linux-wireless, 'Jingoo Han', 'Brett Rudley',
'Arend van Spriel', 'Franky (Zhenhui) Lin',
'Hante Meuleman'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
index 64f4a2b..592ae13 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
@@ -468,7 +468,7 @@ static int brcmf_sdio_pd_probe(struct platform_device *pdev)
brcmf_dbg(SDIO, "Enter\n");
- brcmfmac_sdio_pdata = pdev->dev.platform_data;
+ brcmfmac_sdio_pdata = dev_get_platdata(&pdev->dev);
if (brcmfmac_sdio_pdata->power_on)
brcmfmac_sdio_pdata->power_on();
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 4/8] wireless: cw1200: use dev_get_platdata()
2013-09-10 8:49 [PATCH] wireless: use dev_get_platdata() Jingoo Han
` (2 preceding siblings ...)
2013-09-10 8:54 ` [PATCH 3/8] wireless: brcmfmac: " Jingoo Han
@ 2013-09-10 8:55 ` Jingoo Han
2013-09-10 8:56 ` [PATCH 5/8] wireless: libertas: " Jingoo Han
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jingoo Han @ 2013-09-10 8:55 UTC (permalink / raw)
To: 'John W. Linville'
Cc: linux-wireless, 'Jingoo Han', 'Solomon Peachy'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/wireless/cw1200/cw1200_spi.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/cw1200/cw1200_spi.c b/drivers/net/wireless/cw1200/cw1200_spi.c
index d063760..b7d1e0f 100644
--- a/drivers/net/wireless/cw1200/cw1200_spi.c
+++ b/drivers/net/wireless/cw1200/cw1200_spi.c
@@ -355,7 +355,7 @@ static struct hwbus_ops cw1200_spi_hwbus_ops = {
static int cw1200_spi_probe(struct spi_device *func)
{
const struct cw1200_platform_data_spi *plat_data =
- func->dev.platform_data;
+ dev_get_platdata(&func->dev);
struct hwbus_priv *self;
int status;
@@ -431,7 +431,7 @@ static int cw1200_spi_disconnect(struct spi_device *func)
}
kfree(self);
}
- cw1200_spi_off(func->dev.platform_data);
+ cw1200_spi_off(dev_get_platdata(&func->dev));
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 5/8] wireless: libertas: use dev_get_platdata()
2013-09-10 8:49 [PATCH] wireless: use dev_get_platdata() Jingoo Han
` (3 preceding siblings ...)
2013-09-10 8:55 ` [PATCH 4/8] wireless: cw1200: " Jingoo Han
@ 2013-09-10 8:56 ` Jingoo Han
2013-09-10 8:57 ` [PATCH 6/8] wireless: wl1251: " Jingoo Han
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Jingoo Han @ 2013-09-10 8:56 UTC (permalink / raw)
To: 'John W. Linville'; +Cc: linux-wireless, 'Jingoo Han'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/wireless/libertas/if_spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
index 4bb6574..5d39ec8 100644
--- a/drivers/net/wireless/libertas/if_spi.c
+++ b/drivers/net/wireless/libertas/if_spi.c
@@ -1128,7 +1128,7 @@ static int if_spi_probe(struct spi_device *spi)
{
struct if_spi_card *card;
struct lbs_private *priv = NULL;
- struct libertas_spi_platform_data *pdata = spi->dev.platform_data;
+ struct libertas_spi_platform_data *pdata = dev_get_platdata(&spi->dev);
int err = 0;
lbs_deb_enter(LBS_DEB_SPI);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 6/8] wireless: wl1251: use dev_get_platdata()
2013-09-10 8:49 [PATCH] wireless: use dev_get_platdata() Jingoo Han
` (4 preceding siblings ...)
2013-09-10 8:56 ` [PATCH 5/8] wireless: libertas: " Jingoo Han
@ 2013-09-10 8:57 ` Jingoo Han
2013-09-10 8:57 ` [PATCH 7/8] wireless: wlcore: " Jingoo Han
2013-09-10 8:58 ` [PATCH 8/8] wireless: wl12xx: " Jingoo Han
7 siblings, 0 replies; 9+ messages in thread
From: Jingoo Han @ 2013-09-10 8:57 UTC (permalink / raw)
To: 'John W. Linville'; +Cc: linux-wireless, 'Jingoo Han'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/wireless/ti/wl1251/spi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ti/wl1251/spi.c b/drivers/net/wireless/ti/wl1251/spi.c
index c7dc6fe..1342f81 100644
--- a/drivers/net/wireless/ti/wl1251/spi.c
+++ b/drivers/net/wireless/ti/wl1251/spi.c
@@ -243,7 +243,7 @@ static int wl1251_spi_probe(struct spi_device *spi)
struct wl1251 *wl;
int ret;
- pdata = spi->dev.platform_data;
+ pdata = dev_get_platdata(&spi->dev);
if (!pdata) {
wl1251_error("no platform data");
return -ENODEV;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 7/8] wireless: wlcore: use dev_get_platdata()
2013-09-10 8:49 [PATCH] wireless: use dev_get_platdata() Jingoo Han
` (5 preceding siblings ...)
2013-09-10 8:57 ` [PATCH 6/8] wireless: wl1251: " Jingoo Han
@ 2013-09-10 8:57 ` Jingoo Han
2013-09-10 8:58 ` [PATCH 8/8] wireless: wl12xx: " Jingoo Han
7 siblings, 0 replies; 9+ messages in thread
From: Jingoo Han @ 2013-09-10 8:57 UTC (permalink / raw)
To: 'John W. Linville'
Cc: linux-wireless, 'Jingoo Han', 'Luciano Coelho'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/wireless/ti/wlcore/main.c | 2 +-
drivers/net/wireless/ti/wlcore/spi.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ti/wlcore/main.c b/drivers/net/wireless/ti/wlcore/main.c
index 38995f9..c30e1f1 100644
--- a/drivers/net/wireless/ti/wlcore/main.c
+++ b/drivers/net/wireless/ti/wlcore/main.c
@@ -5900,7 +5900,7 @@ static void wlcore_nvs_cb(const struct firmware *fw, void *context)
{
struct wl1271 *wl = context;
struct platform_device *pdev = wl->pdev;
- struct wlcore_platdev_data *pdev_data = pdev->dev.platform_data;
+ struct wlcore_platdev_data *pdev_data = dev_get_platdata(&pdev->dev);
struct wl12xx_platform_data *pdata = pdev_data->pdata;
unsigned long irqflags;
int ret;
diff --git a/drivers/net/wireless/ti/wlcore/spi.c b/drivers/net/wireless/ti/wlcore/spi.c
index 1b0cd98..b2c018d 100644
--- a/drivers/net/wireless/ti/wlcore/spi.c
+++ b/drivers/net/wireless/ti/wlcore/spi.c
@@ -335,7 +335,7 @@ static int wl1271_probe(struct spi_device *spi)
if (!pdev_data)
goto out;
- pdev_data->pdata = spi->dev.platform_data;
+ pdev_data->pdata = dev_get_platdata(&spi->dev);
if (!pdev_data->pdata) {
dev_err(&spi->dev, "no platform data\n");
ret = -ENODEV;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 8/8] wireless: wl12xx: use dev_get_platdata()
2013-09-10 8:49 [PATCH] wireless: use dev_get_platdata() Jingoo Han
` (6 preceding siblings ...)
2013-09-10 8:57 ` [PATCH 7/8] wireless: wlcore: " Jingoo Han
@ 2013-09-10 8:58 ` Jingoo Han
7 siblings, 0 replies; 9+ messages in thread
From: Jingoo Han @ 2013-09-10 8:58 UTC (permalink / raw)
To: 'John W. Linville'
Cc: linux-wireless, 'Jingoo Han', 'Luciano Coelho'
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly. This is a cosmetic change
to make the code simpler and enhance the readability.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/wireless/ti/wl12xx/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c
index 1c627da..591526b 100644
--- a/drivers/net/wireless/ti/wl12xx/main.c
+++ b/drivers/net/wireless/ti/wl12xx/main.c
@@ -1704,7 +1704,7 @@ static struct ieee80211_sta_ht_cap wl12xx_ht_cap = {
static int wl12xx_setup(struct wl1271 *wl)
{
struct wl12xx_priv *priv = wl->priv;
- struct wlcore_platdev_data *pdev_data = wl->pdev->dev.platform_data;
+ struct wlcore_platdev_data *pdev_data = dev_get_platdata(&wl->pdev->dev);
struct wl12xx_platform_data *pdata = pdev_data->pdata;
wl->rtable = wl12xx_rtable;
--
1.7.10.4
^ permalink raw reply related [flat|nested] 9+ messages in thread