Lines Matching refs:pp
2607 struct pmu_private *pp; in pmu_pass_intr() local
2612 if (len > sizeof(pp->rb_buf[0].data)) in pmu_pass_intr()
2613 len = sizeof(pp->rb_buf[0].data); in pmu_pass_intr()
2616 pp = list_entry(list, struct pmu_private, list); in pmu_pass_intr()
2617 spin_lock(&pp->lock); in pmu_pass_intr()
2618 i = pp->rb_put + 1; in pmu_pass_intr()
2621 if (i != pp->rb_get) { in pmu_pass_intr()
2622 struct rb_entry *rp = &pp->rb_buf[pp->rb_put]; in pmu_pass_intr()
2625 pp->rb_put = i; in pmu_pass_intr()
2626 wake_up_interruptible(&pp->wait); in pmu_pass_intr()
2628 spin_unlock(&pp->lock); in pmu_pass_intr()
2635 struct pmu_private *pp; in pmu_open() local
2638 pp = kmalloc(sizeof(struct pmu_private), GFP_KERNEL); in pmu_open()
2639 if (pp == 0) in pmu_open()
2641 pp->rb_get = pp->rb_put = 0; in pmu_open()
2642 spin_lock_init(&pp->lock); in pmu_open()
2643 init_waitqueue_head(&pp->wait); in pmu_open()
2646 pp->backlight_locker = 0; in pmu_open()
2648 list_add(&pp->list, &all_pmu_pvt); in pmu_open()
2650 file->private_data = pp; in pmu_open()
2658 struct pmu_private *pp = file->private_data; in pmu_read() local
2663 if (count < 1 || pp == 0) in pmu_read()
2669 spin_lock_irqsave(&pp->lock, flags); in pmu_read()
2670 add_wait_queue(&pp->wait, &wait); in pmu_read()
2675 if (pp->rb_get != pp->rb_put) { in pmu_read()
2676 int i = pp->rb_get; in pmu_read()
2677 struct rb_entry *rp = &pp->rb_buf[i]; in pmu_read()
2679 spin_unlock_irqrestore(&pp->lock, flags); in pmu_read()
2686 spin_lock_irqsave(&pp->lock, flags); in pmu_read()
2687 pp->rb_get = i; in pmu_read()
2696 spin_unlock_irqrestore(&pp->lock, flags); in pmu_read()
2698 spin_lock_irqsave(&pp->lock, flags); in pmu_read()
2701 remove_wait_queue(&pp->wait, &wait); in pmu_read()
2702 spin_unlock_irqrestore(&pp->lock, flags); in pmu_read()
2715 struct pmu_private *pp = filp->private_data; in pmu_fpoll() local
2719 if (pp == 0) in pmu_fpoll()
2721 poll_wait(filp, &pp->wait, wait); in pmu_fpoll()
2722 spin_lock_irqsave(&pp->lock, flags); in pmu_fpoll()
2723 if (pp->rb_get != pp->rb_put) in pmu_fpoll()
2725 spin_unlock_irqrestore(&pp->lock, flags); in pmu_fpoll()
2731 struct pmu_private *pp = file->private_data; in pmu_release() local
2735 if (pp != 0) { in pmu_release()
2738 list_del(&pp->list); in pmu_release()
2741 if (pp->backlight_locker) { in pmu_release()
2747 kfree(pp); in pmu_release()
2757 struct pmu_private *pp = filp->private_data; in pmu_ioctl() local
2810 if (pp->backlight_locker) in pmu_ioctl()
2812 pp->backlight_locker = 1; in pmu_ioctl()