Lines Matching refs:fd
141 int fd, sz, id; in init_rfkill() local
148 fd = open(path, O_RDONLY); in init_rfkill()
149 if (fd < 0) { in init_rfkill()
155 sz = read(fd, &buf, sizeof(buf)); in init_rfkill()
156 close(fd); in init_rfkill()
279 int fd = -1; in upio_set_bluetooth_power() local
317 fd = open(rfkill_state_path, O_WRONLY); in upio_set_bluetooth_power()
318 if (fd < 0) { in upio_set_bluetooth_power()
324 sz = write(fd, &buffer, 1); in upio_set_bluetooth_power()
332 if (fd >= 0) { in upio_set_bluetooth_power()
333 close(fd); in upio_set_bluetooth_power()
352 int fd = -1; in upio_set() local
367 fd = open(VENDOR_LPM_PROC_NODE, O_WRONLY); in upio_set()
368 if (fd < 0) { in upio_set()
386 if (write(fd, &buffer, 1) < 0) { in upio_set()
412 if (fd >= 0) in upio_set()
413 close(fd); in upio_set()
455 fd = open(VENDOR_BTWRITE_PROC_NODE, O_WRONLY); in upio_set()
456 if (fd < 0) { in upio_set()
468 if (write(fd, &buffer, 1) < 0) { in upio_set()
486 if (fd >= 0) in upio_set()
487 close(fd); in upio_set()