public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: ebiederm@xmission.com (Eric W. Biederman)
To: Greg KH <greg@kroah.com>
Cc: Greg KH <gregkh@suse.de>, "Hans J. Koch" <hjk@linutronix.de>,
	linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: [PATCH 3/5] uio: Remove unused uio_info mmap method.
Date: Sun, 26 Sep 2010 15:48:19 -0700	[thread overview]
Message-ID: <m1tylc86ks.fsf_-_@fess.ebiederm.org> (raw)
In-Reply-To: <20100926192142.GA7252@kroah.com> (Greg KH's message of "Sun, 26 Sep 2010 12:21:42 -0700")


There are no drivers in the kernel that implement the uio_info mmap
method there is no point in keeping it.

Further keeping the mmap method would necessiate wrapping all of the
methods in vm_operations_struct to successfully implement suppport
for hotunplugable hardware, and it I have yet to find a correct way to
wrap the the vm_operations_struct close method.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
---
 drivers/uio/uio.c          |    6 ------
 include/linux/uio_driver.h |    1 -
 2 files changed, 0 insertions(+), 7 deletions(-)

diff --git a/drivers/uio/uio.c b/drivers/uio/uio.c
index 95f25ae..fc52fbc 100644
--- a/drivers/uio/uio.c
+++ b/drivers/uio/uio.c
@@ -659,7 +659,6 @@ static int uio_mmap(struct file *filep, struct vm_area_struct *vma)
 	struct uio_device *idev = listener->dev;
 	int mi;
 	unsigned long requested_pages, actual_pages;
-	int ret = 0;
 
 	if (vma->vm_end < vma->vm_start)
 		return -EINVAL;
@@ -676,11 +675,6 @@ static int uio_mmap(struct file *filep, struct vm_area_struct *vma)
 	if (requested_pages > actual_pages)
 		return -EINVAL;
 
-	if (idev->info->mmap) {
-		ret = idev->info->mmap(idev->info, vma);
-		return ret;
-	}
-
 	switch (idev->info->mem[mi].memtype) {
 		case UIO_MEM_PHYS:
 			return uio_mmap_physical(vma);
diff --git a/include/linux/uio_driver.h b/include/linux/uio_driver.h
index d6188e5..33789d4 100644
--- a/include/linux/uio_driver.h
+++ b/include/linux/uio_driver.h
@@ -88,7 +88,6 @@ struct uio_info {
 	unsigned long		irq_flags;
 	void			*priv;
 	irqreturn_t (*handler)(int irq, struct uio_info *dev_info);
-	int (*mmap)(struct uio_info *info, struct vm_area_struct *vma);
 	int (*open)(struct uio_info *info, struct inode *inode);
 	int (*release)(struct uio_info *info, struct inode *inode);
 	int (*irqcontrol)(struct uio_info *info, s32 irq_on);
-- 
1.7.2.2


  parent reply	other threads:[~2010-09-26 22:48 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-14 18:35 [PATCH 0/5] Uio enhancements Eric W. Biederman
2010-09-14 18:36 ` [PATCH 1/5] uio: Fix lack of locking in init_uio_class Eric W. Biederman
2010-09-17 20:32   ` Thomas Gleixner
2010-09-17 20:49     ` Hans J. Koch
2010-09-14 18:36 ` [PATCH 2/5] uio: Don't clear driver data Eric W. Biederman
2010-09-17 20:33   ` Thomas Gleixner
2010-09-17 20:50     ` Hans J. Koch
2010-09-14 18:37 ` [PATCH 3/5] uio: Cleanup irq handling Eric W. Biederman
2010-09-17 20:34   ` Thomas Gleixner
2010-09-17 20:51     ` Hans J. Koch
2010-09-14 18:38 ` [PATCH 4/5] uio: Support 2^MINOR_BITS minors Eric W. Biederman
2010-09-17 20:36   ` Thomas Gleixner
2010-09-17 20:57     ` Hans J. Koch
2010-09-17 21:09       ` Greg KH
2010-09-21 21:08     ` Greg KH
2010-09-21 21:38       ` Thomas Gleixner
2010-09-21 21:56         ` Greg KH
2010-09-21 22:21         ` Eric W. Biederman
2010-09-21 22:26           ` Thomas Gleixner
2010-09-14 18:38 ` [PATCH 5/5] uio: Statically allocate uio_class and use class .dev_attrs Eric W. Biederman
2010-09-17 20:37   ` Thomas Gleixner
2010-09-17 20:57     ` Hans J. Koch
2010-09-17 20:59 ` [PATCH 0/5] Uio enhancements Hans J. Koch
2010-09-20  7:19   ` [PATCH 0/5] uio hotplug support Eric W. Biederman
2010-09-20  7:21     ` [PATCH 1/5] uio: Simplify the lifetime logic of struct uio_device Eric W. Biederman
2010-09-20  7:21     ` [PATCH 2/5] uio: Kill unused vma_count Eric W. Biederman
2010-09-20  7:23     ` [PATCH 3/5] uio: Remove unused uio_info mmap method Eric W. Biederman
2010-09-20  7:23     ` [PATCH 4/5] libunload: A library to help remove open files Eric W. Biederman
2010-09-20  7:24     ` [PATCH 5/5] uio: Implement hotunplug support, using libunload Eric W. Biederman
2010-09-24 10:55       ` Hans J. Koch
2010-09-24 17:11         ` Eric W. Biederman
2010-09-25  2:06         ` [PATCH] uio: Fix accidentally changed return value in uio_read Eric W. Biederman
2010-09-24 10:45     ` [PATCH 0/5] uio hotplug support Hans J. Koch
2010-09-24 17:14       ` Eric W. Biederman
2010-09-24 17:31         ` Hans J. Koch
2010-09-24 18:38           ` Eric W. Biederman
2010-09-25  0:05           ` Eric W. Biederman
2010-09-25  0:33             ` Greg KH
2010-09-25  1:54               ` Eric W. Biederman
2010-09-26 19:21                 ` Greg KH
2010-09-26 22:46                   ` [PATCH 1/5] uio: Simplify the lifetime logic of struct uio_device Eric W. Biederman
2010-09-30 22:00                     ` Hans J. Koch
2010-09-26 22:47                   ` [PATCH 2/5] uio: Kill unused vma_count Eric W. Biederman
2010-09-26 22:48                   ` Eric W. Biederman [this message]
2010-10-04  9:26                     ` [PATCH 3/5] uio: Remove unused uio_info mmap method Hans J. Koch
2010-09-26 22:48                   ` [PATCH 4/5] libunload: A library to help remove open files Eric W. Biederman
2010-10-04  9:56                     ` Hans J. Koch
2010-09-26 22:49                   ` [PATCH 5/5] uio: Implement hotunplug support, using libunload Eric W. Biederman
2010-10-04 10:47                     ` Hans J. Koch
2010-10-04 12:34                     ` Hans J. Koch
2010-10-04 18:19                       ` Eric W. Biederman
2010-10-04 18:52                         ` Hans J. Koch
2010-09-26 22:49                   ` [PATCH 6/5] uio: Fix accidentally changed return value in uio_read Eric W. Biederman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m1tylc86ks.fsf_-_@fess.ebiederm.org \
    --to=ebiederm@xmission.com \
    --cc=greg@kroah.com \
    --cc=gregkh@suse.de \
    --cc=hjk@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox