[PATCH 2/3] ARM: tegra: paz00: export the WIFI rfkill gpio

Stephen Warren swarren at nvidia.com
Fri Jul 15 13:30:42 EDT 2011


Sergei Shtylyov wrote at Friday, July 15, 2011 11:25 AM:
> Stephen Warren wrote:
> 
> >> This makes the WIFI rfkill gpio available to userspace. On boot,
> >> WIFI will be unblocked by default.
> > ...
> >> +static void __init paz00_wifi_init(void)
> >> +{
> >> +	int ret;
> >> +
> >> +	/* unlock hw rfkill */
> >> +	ret = gpio_request_one(TEGRA_WIFI_PWRN, GPIOF_OUT_INIT_HIGH,
> >> +		"wifi pwrn");
> >> +	if (ret) {
> >> +		pr_warning("WIFI: could not requestrfkill gpio\n");
> >> +		return;
> >> +	}
> >> +	gpio_export(TEGRA_WIFI_PWRN, 0);
> >> +};
> >
> > Wouldn't you want to skip the gpio_export() call if the gpio_request()
> > call failed?
> 
>     I think that's what he does -- there's a *return* statement.

D'oh. There is indeed. For some reason I only noticed the warning call.
I guess I suck at reviews:-(

-- 
nvpublic




More information about the linux-arm-kernel mailing list