static int rfkill_threeg_set(void *data, bool blocked) { if (blocked) set_device_state("0", 0, MSI_STANDARD_EC_3G_MASK); else set_device_state("1", 0, MSI_STANDARD_EC_3G_MASK); return 0; }
static int rfkill_bluetooth_set(void *data, bool blocked) { if (blocked) set_device_state("0", 0, MSI_STANDARD_EC_BLUETOOTH_MASK); else set_device_state("1", 0, MSI_STANDARD_EC_BLUETOOTH_MASK); return 0; }
static int rfkill_bluetooth_set(void *data, bool blocked) { /* Do something with blocked...*/ /* * blocked == false is on * blocked == true is off */ if (blocked) set_device_state("0", 0, MSI_STANDARD_EC_BLUETOOTH_MASK); else set_device_state("1", 0, MSI_STANDARD_EC_BLUETOOTH_MASK); return 0; }
static int rfkill_threeg_set(void *data, bool blocked) { int result = set_device_state(blocked ? "0" : "1", 0, MSI_STANDARD_EC_3G_MASK); return min(result, 0); }
static int rfkill_bluetooth_set(void *data, bool blocked) { /* Do something with blocked...*/ /* * blocked == false is on * blocked == true is off */ int result = set_device_state(blocked ? "0" : "1", 0, MSI_STANDARD_EC_BLUETOOTH_MASK); return min(result, 0); }
static ssize_t store_threeg(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { return set_device_state(buf, count, MSI_STANDARD_EC_3G_MASK); }
static ssize_t store_bluetooth(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { return set_device_state(buf, count, MSI_STANDARD_EC_BLUETOOTH_MASK); }