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

Sergei Shtylyov sshtylyov at mvista.com
Fri Jul 15 13:25:00 EDT 2011


Hello.

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.

WBR, Sergei



More information about the linux-arm-kernel mailing list