Skip to content

Commit

Permalink
wlcore: fix unused variables warnings (SQUASH)
Browse files Browse the repository at this point in the history
If CONFIG_OF is not defined, the compiler complains about
some unused variables. solve it.

This patch should be squashed into
"wlcore: ifdef CONFIG_OF-dependant functions"

Signed-off-by: Eliad Peller <eliad@wizery.com>
  • Loading branch information
elp committed Jan 21, 2014
1 parent 64de273 commit 88850fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/net/wireless/ti/wlcore/sdio.c
Expand Up @@ -226,8 +226,7 @@ MODULE_DEVICE_TABLE(of, wlcore_of_match);
static struct wl12xx_platform_data *get_platform_data(struct device *dev)
{
struct wl12xx_platform_data *pdata;
struct device_node *np;
u32 gpio;
struct device_node __maybe_unused *np;

pdata = wl12xx_get_platform_data();
if (!IS_ERR(pdata))
Expand All @@ -247,6 +246,8 @@ static struct wl12xx_platform_data *get_platform_data(struct device *dev)
}

if (of_property_read_u32(np, "irq", &pdata->irq)) {
u32 gpio;

if (!of_property_read_u32(np, "gpio", &gpio) &&
!gpio_request_one(gpio, GPIOF_IN, "wlcore_irq")) {
pdata->gpio = gpio;
Expand Down

0 comments on commit 88850fb

Please sign in to comment.