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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Marc Dietrich wrote at Friday, July 15, 2011 4:24 AM:
> 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?

Of course, this is moot since Vasily mentioned the gpio-rfkill driver.
Luckily, that driver is already in Tegra's for-next, so it should be
pretty easy to adapt to.

-- 
nvpublic

--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux