Commit f780670b authored by Russell King's avatar Russell King Committed by Vojtech Pavlik

input: Update pcips2 driver

Use pci_request_regions()/pci_release_regions() instead of
request_region()/release_region()

Signed-off-by: Russell King <rmk@arm.linux.org.uk>   
Signed-off-by: default avatarVojtech Pavlik <vojtech@suse.cz>
parent 7aac3626
...@@ -134,13 +134,11 @@ static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_i ...@@ -134,13 +134,11 @@ static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_i
ret = pci_enable_device(dev); ret = pci_enable_device(dev);
if (ret) if (ret)
return ret; goto out;
if (!request_region(pci_resource_start(dev, 0), ret = pci_request_regions(dev, "pcips2");
pci_resource_len(dev, 0), "pcips2")) { if (ret)
ret = -EBUSY;
goto disable; goto disable;
}
ps2if = kmalloc(sizeof(struct pcips2_data), GFP_KERNEL); ps2if = kmalloc(sizeof(struct pcips2_data), GFP_KERNEL);
serio = kmalloc(sizeof(struct serio), GFP_KERNEL); serio = kmalloc(sizeof(struct serio), GFP_KERNEL);
...@@ -172,10 +170,10 @@ static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_i ...@@ -172,10 +170,10 @@ static int __devinit pcips2_probe(struct pci_dev *dev, const struct pci_device_i
release: release:
kfree(ps2if); kfree(ps2if);
kfree(serio); kfree(serio);
release_region(pci_resource_start(dev, 0), pci_release_regions(dev);
pci_resource_len(dev, 0));
disable: disable:
pci_disable_device(dev); pci_disable_device(dev);
out:
return ret; return ret;
} }
...@@ -184,10 +182,9 @@ static void __devexit pcips2_remove(struct pci_dev *dev) ...@@ -184,10 +182,9 @@ static void __devexit pcips2_remove(struct pci_dev *dev)
struct pcips2_data *ps2if = pci_get_drvdata(dev); struct pcips2_data *ps2if = pci_get_drvdata(dev);
serio_unregister_port(ps2if->io); serio_unregister_port(ps2if->io);
release_region(pci_resource_start(dev, 0),
pci_resource_len(dev, 0));
pci_set_drvdata(dev, NULL); pci_set_drvdata(dev, NULL);
kfree(ps2if); kfree(ps2if);
pci_release_regions(dev);
pci_disable_device(dev); pci_disable_device(dev);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment