Esempio n. 1
0
static ssize_t store_gps(struct device *dev, struct device_attribute *attr,
			 const char *buf, size_t count)
{
	struct asus_laptop *asus = dev_get_drvdata(dev);
	int rv, value;
	int ret;

	rv = parse_arg(buf, count, &value);
	if (rv <= 0)
		return -EINVAL;
	ret = asus_gps_switch(asus, !!value);
	if (ret)
		return ret;
	rfkill_set_sw_state(asus->gps_rfkill, !value);
	return rv;
}
Esempio n. 2
0
/*
 * rfkill
 */
static int asus_gps_rfkill_set(void *data, bool blocked)
{
	struct asus_laptop *asus = data;

	return asus_gps_switch(asus, !blocked);
}
Esempio n. 3
0
/*
 * rfkill
 */
static int asus_gps_rfkill_set(void *data, bool blocked)
{
	acpi_handle handle = data;

	return asus_gps_switch(handle, !blocked);
}