acorn_request_region fix 2.5.48
PATCH 1/1 acorn_request_region fix 2.5.48
Hi,
Following patch is to fix acorn request region failure. Pls apply.
dhammika
-----------------
linux/drivers/acorn/net/ether1.c Mon Nov 25 11:19:52 2002 renamed from linux-2.5.48/drivers/acorn/net/ether1.c Mon Nov 18 10:29:47 2002 +14 -6
@@ -1035,13 +1035,20 @@ /* * these will not fail - the nature of the bus ensures this */ - request_region(dev->base_addr, 16, dev->name); - request_region(dev->base_addr + 0x800, 4096, dev->name); + if(!request_region(dev->base_addr, 16, dev->name)){ + ret = -EBUSY; + goto release1; + } + + if(!request_region(dev->base_addr + 0x800, 4096, dev->name)){ + ret = -EBUSY; + goto release2; + } priv = (struct ether1_priv *)dev->priv; if ((priv->bus_type = ether1_reset(dev)) == 0) { ret = -ENODEV; - goto release; + goto release3; } printk(KERN_INFO "%s: ether1 in slot %d, ",
@@ -1054,7 +1061,7 @@ if (ether1_init_2(dev)) { ret = -ENODEV; - goto release; + goto release3; } dev->open = ether1_open;
@@ -1069,9 +1076,11 @@ ecard_set_drvdata(ec, dev); return 0; -release: +release3: release_region(dev->base_addr, 16); +release2: release_region(dev->base_addr + 0x800, 4096); +release1: unregister_netdev(dev); -----------------
----------------------------------------- (on postoffice)
The information contained in this email is confidential and is meant to be read only by the person to whom it is addressed.Please visit http://www.millenniumit.com/legal/email.htm to read the entire confidentiality clause.
---------------------------------------------------------
Quoted 1 line · Dhammika Pathirana
Following patch is to fix acorn request region failure. Pls apply.
In the great spirit of the white space vs tab debate that's been on lkml over the past few days, welcome to why white space advocates coding their stupid ideas into mailers is bad news.
Your patch doesn't apply for this very reason. Please try sending it to me as a text/plain attachment.
Thanks.
Signature · 2 lines
Russell King ([email protected]) The developer of ARM Linux http://www.arm.linux.org.uk/personal/aboutme.html