Update pcips2 driver
PATCH 1/1 Update pcips2 driver
Use pci_request_regions()/pci_release_regions() instead of request_region()/release_region()
./drivers/input/serio/pcips2.c +6 -9
@@ -133,13 +133,11 @@ static int __devinit pcips2_probe(struct ret =pci_enable_device (dev);if (ret) -return ret; + goto out; -if (!request_region (pci_resource_start (dev,0 ), -pci_resource_len (dev,0 ),"pcips2" )) { - ret = -EBUSY ; + ret =pci_request_regions (dev,"pcips2" ); +if (ret) goto disable; - } ps2if =kmalloc (sizeof (struct pcips2_data ),GFP_KERNEL );if (!ps2if) {
@@ -165,10 +163,10 @@ static int __devinit pcips2_probe(structreturn 0 ; release: -release_region (pci_resource_start (dev,0 ), -pci_resource_len (dev,0 )); +pci_release_regions (dev); disable:pci_disable_device (dev); + out:return ret; }
@@ -177,10 +175,9 @@ static void __devexit pcips2_remove(strustruct pcips2_data *ps2if =pci_get_drvdata (dev);serio_unregister_port (&ps2if->io); -release_region (pci_resource_start (dev,0 ), -pci_resource_len (dev,0 ));pci_set_drvdata (dev,NULL );kfree (ps2if); +pci_release_regions (dev);pci_disable_device (dev); }
Signature · 4 lines
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial coreQuoted 3 lines · Russell King
Use pci_request_regions()/pci_release_regions() instead of request_region()/release_region()
Some of this patch is already in Vojtech's tree. If it's not critical, perhaps it would be best if he took the remaining bit:
From: Russell King <[email protected]>
Use pci_request_regions()/pci_release_regions() instead of request_region()/release_region()
---
25-akpm/./drivers/input/serio/pcips2.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-)
./drivers/input/serio/pcips2.c renamed from ./drivers/input/serio/pcips2.c~update-pcips2-driver +3 -5
@@ -134,13 +134,11 @@ static int __devinit pcips2_probe(struct ret =pci_enable_device (dev);if (ret) -return ret; + goto out; -if (!request_region (pci_resource_start (dev,0 ), -pci_resource_len (dev,0 ),"pcips2" )) { - ret = -EBUSY ; + ret =pci_request_regions (dev,"pcips2" ); +if (ret) goto disable; - } ps2if =kmalloc (sizeof (struct pcips2_data ),GFP_KERNEL ); serio =kmalloc (sizeof (struct serio ),GFP_KERNEL );
_
Quoted 7 lines · Andrew Morton
Quoted 3 lines · Russell King
Use pci_request_regions()/pci_release_regions() instead of request_region()/release_region()
Some of this patch is already in Vojtech's tree. If it's not critical, perhaps it would be best if he took the remaining bit:
Looking at the bits in the 2.6.7-mm7 tree, none of my original patch is merged, and merging the bit below would mean that we then have an asymetry between the function used to request the resources and the function used to release them.
Therefore, I think the original patch should stand as-is.
Signature · 4 lines
Russell King
Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/
maintainer of: 2.6 PCMCIA - http://pcmcia.arm.linux.org.uk/
2.6 Serial coreQuoted 9 lines · Russell King
Quoted 7 lines · Andrew Morton
Quoted 3 lines · Russell King
Use pci_request_regions()/pci_release_regions() instead of request_region()/release_region()
Some of this patch is already in Vojtech's tree. If it's not critical, perhaps it would be best if he took the remaining bit:
Quoted 6 lines
Looking at the bits in the 2.6.7-mm7 tree, none of my original patch is merged, and merging the bit below would mean that we then have an asymetry between the function used to request the resources and the function used to release them.
Therefore, I think the original patch should stand as-is.
I don't seem to have the bigger patch in my mailbox. Can you resend it? Thanks.
Signature · 2 lines
Vojtech Pavlik SuSE Labs, SuSE CR