Lines Matching refs:lh
435 struct linehandle_state *lh = filep->private_data; in linehandle_ioctl() local
445 lh->numdescs, in linehandle_ioctl()
446 lh->descs, in linehandle_ioctl()
452 for (i = 0; i < lh->numdescs; i++) in linehandle_ioctl()
464 if (!test_bit(FLAG_IS_OUT, &lh->descs[0]->flags)) in linehandle_ioctl()
471 for (i = 0; i < lh->numdescs; i++) in linehandle_ioctl()
477 lh->numdescs, in linehandle_ioctl()
478 lh->descs, in linehandle_ioctl()
494 struct linehandle_state *lh = filep->private_data; in linehandle_release() local
495 struct gpio_device *gdev = lh->gdev; in linehandle_release()
498 for (i = 0; i < lh->numdescs; i++) in linehandle_release()
499 gpiod_free(lh->descs[i]); in linehandle_release()
500 kfree(lh->label); in linehandle_release()
501 kfree(lh); in linehandle_release()
519 struct linehandle_state *lh; in linehandle_create() local
558 lh = kzalloc(sizeof(*lh), GFP_KERNEL); in linehandle_create()
559 if (!lh) in linehandle_create()
561 lh->gdev = gdev; in linehandle_create()
567 lh->label = kstrdup(handlereq.consumer_label, in linehandle_create()
569 if (!lh->label) { in linehandle_create()
586 ret = gpiod_request(desc, lh->label); in linehandle_create()
589 lh->descs[i] = desc; in linehandle_create()
623 lh->numdescs = handlereq.lines; in linehandle_create()
633 lh, in linehandle_create()
654 lh->numdescs); in linehandle_create()
662 gpiod_free(lh->descs[i]); in linehandle_create()
663 kfree(lh->label); in linehandle_create()
665 kfree(lh); in linehandle_create()