Commit 90650625 authored by Jingoo Han's avatar Jingoo Han Committed by John W. Linville

wireless: wlcore: use dev_get_platdata()

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: default avatarJingoo Han <jg1.han@samsung.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 5f4fe16b
...@@ -5900,7 +5900,7 @@ static void wlcore_nvs_cb(const struct firmware *fw, void *context) ...@@ -5900,7 +5900,7 @@ static void wlcore_nvs_cb(const struct firmware *fw, void *context)
{ {
struct wl1271 *wl = context; struct wl1271 *wl = context;
struct platform_device *pdev = wl->pdev; 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; struct wl12xx_platform_data *pdata = pdev_data->pdata;
unsigned long irqflags; unsigned long irqflags;
int ret; int ret;
......
...@@ -335,7 +335,7 @@ static int wl1271_probe(struct spi_device *spi) ...@@ -335,7 +335,7 @@ static int wl1271_probe(struct spi_device *spi)
if (!pdev_data) if (!pdev_data)
goto out; goto out;
pdev_data->pdata = spi->dev.platform_data; pdev_data->pdata = dev_get_platdata(&spi->dev);
if (!pdev_data->pdata) { if (!pdev_data->pdata) {
dev_err(&spi->dev, "no platform data\n"); dev_err(&spi->dev, "no platform data\n");
ret = -ENODEV; ret = -ENODEV;
......
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