mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-12 17:38:19 +00:00
[module] remove now deprecated uio support
This commit is contained in:
parent
267fa6e389
commit
fd2801a670
@ -24,7 +24,6 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/uio_driver.h>
|
||||
#include <linux/fs.h>
|
||||
#include <linux/dma-buf.h>
|
||||
#include <linux/highmem.h>
|
||||
@ -53,7 +52,6 @@ static struct kvmfr_info *kvmfr;
|
||||
struct kvmfr_dev
|
||||
{
|
||||
unsigned long size;
|
||||
struct uio_info uio;
|
||||
int minor;
|
||||
dev_t devNo;
|
||||
struct device * pDev;
|
||||
@ -263,37 +261,14 @@ static int kvmfr_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
|
||||
if (pci_request_regions(dev, KVMFR_DEV_NAME))
|
||||
goto out_disable;
|
||||
|
||||
kdev->uio.mem[0].addr = pci_resource_start(dev, 2);
|
||||
if (!kdev->uio.mem[0].addr)
|
||||
goto out_release;
|
||||
|
||||
kdev->uio.mem[0].internal_addr = ioremap_wt(
|
||||
pci_resource_start(dev, 2),
|
||||
pci_resource_len (dev, 2)
|
||||
);
|
||||
|
||||
if (!kdev->uio.mem[0].internal_addr)
|
||||
goto out_release;
|
||||
|
||||
kdev->size = pci_resource_len(dev, 2);
|
||||
|
||||
kdev->uio.mem[0].size = pci_resource_len(dev, 2);
|
||||
kdev->uio.mem[0].memtype = UIO_MEM_PHYS;
|
||||
kdev->uio.name = KVMFR_UIO_NAME;
|
||||
kdev->uio.version = KVMFR_UIO_VER;
|
||||
kdev->uio.irq = 0;
|
||||
kdev->uio.irq_flags = 0;
|
||||
kdev->uio.handler = NULL;
|
||||
|
||||
if (uio_register_device(&dev->dev, &kdev->uio))
|
||||
goto out_unmap;
|
||||
|
||||
mutex_lock(&minor_lock);
|
||||
kdev->minor = idr_alloc(&kvmfr_idr, kdev, 0, KVMFR_MAX_DEVICES, GFP_KERNEL);
|
||||
if (kdev->minor < 0)
|
||||
{
|
||||
mutex_unlock(&minor_lock);
|
||||
goto out_unreg;
|
||||
goto out_release;
|
||||
}
|
||||
mutex_unlock(&minor_lock);
|
||||
|
||||
@ -320,10 +295,6 @@ out_unminor:
|
||||
mutex_lock(&minor_lock);
|
||||
idr_remove(&kvmfr_idr, kdev->minor);
|
||||
mutex_unlock(&minor_lock);
|
||||
out_unreg:
|
||||
uio_unregister_device(&kdev->uio);
|
||||
out_unmap:
|
||||
iounmap(kdev->uio.mem[0].internal_addr);
|
||||
out_release:
|
||||
pci_release_regions(dev);
|
||||
out_disable:
|
||||
@ -344,10 +315,8 @@ static void kvmfr_pci_remove(struct pci_dev *dev)
|
||||
idr_remove(&kvmfr_idr, kdev->minor);
|
||||
mutex_unlock(&minor_lock);
|
||||
|
||||
uio_unregister_device(&kdev->uio);
|
||||
pci_release_regions(dev);
|
||||
pci_disable_device(dev);
|
||||
iounmap(kdev->uio.mem[0].internal_addr);
|
||||
|
||||
kfree(kdev);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user