Skip to content

Commit b65c401

Browse files
Uwe Kleine-Königgregkh
authored andcommitted
uio: drop unused vma_count member in uio_device struct
vma_count is used write-only and so fails to be useful. So remove it. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7294151 commit b65c401

1 file changed

Lines changed: 0 additions & 16 deletions

File tree

‎drivers/uio/uio.c‎

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ struct uio_device {
3535
atomic_t event;
3636
struct fasync_struct *async_queue;
3737
wait_queue_head_t wait;
38-
int vma_count;
3938
struct uio_info *info;
4039
struct kobject *map_dir;
4140
struct kobject *portio_dir;
@@ -593,18 +592,6 @@ static int uio_find_mem_index(struct vm_area_struct *vma)
593592
return -1;
594593
}
595594

596-
static void uio_vma_open(struct vm_area_struct *vma)
597-
{
598-
struct uio_device *idev = vma->vm_private_data;
599-
idev->vma_count++;
600-
}
601-
602-
static void uio_vma_close(struct vm_area_struct *vma)
603-
{
604-
struct uio_device *idev = vma->vm_private_data;
605-
idev->vma_count--;
606-
}
607-
608595
static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
609596
{
610597
struct uio_device *idev = vma->vm_private_data;
@@ -631,16 +618,13 @@ static int uio_vma_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
631618
}
632619

633620
static const struct vm_operations_struct uio_logical_vm_ops = {
634-
.open = uio_vma_open,
635-
.close = uio_vma_close,
636621
.fault = uio_vma_fault,
637622
};
638623

639624
static int uio_mmap_logical(struct vm_area_struct *vma)
640625
{
641626
vma->vm_flags |= VM_DONTEXPAND | VM_DONTDUMP;
642627
vma->vm_ops = &uio_logical_vm_ops;
643-
uio_vma_open(vma);
644628
return 0;
645629
}
646630

0 commit comments

Comments
 (0)