Skip to contentSkip to conversation

eepro attempts to do its own PNP handling

Kernel-janitors Matthew Wilcox 1 participant 1 message Jul 12, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Adam, how should this be handled? Can we just rip this code out?

----- Forwarded message from Kristen Carlson <[email protected]> -----

From: Kristen Carlson <[email protected]>
To: [email protected]
Date: Mon, 12 Jul 2004 14:14:32 -0700 (PDT)
X-Mailer: ELM [version 2.5 PL5]
X-Virus-Scanned: by amavisd-new
X-Spam-Status: No, hits=0 required=5 tests=
X-Spam-Checker-Version: SpamAssassin 2.63-osdl_revision__1.18__
X-MIMEDefang-Filter: osdl$Revision: 1.70 $
X-Scanned-By: MIMEDefang 2.36
Subject: [Kernel-janitors] [PATCH] remove check_region from eepro.c
X-BeenThere: [email protected]
X-Mailman-Version: 2.1.2
Precedence: list
List-Id: Kernel janitors discussions and patches
<kernel-janitors.lists.osdl.org>
List-Unsubscribe: <http://lists.osdl.org/mailman/listinfo/kernel-janitors>,
<mailto:[email protected]?subject=unsubscribe>
List-Archive: <http://lists.osdl.org/pipermail/kernel-janitors>
List-Post: <mailto:[email protected]>
List-Help: <mailto:[email protected]?subject=help>
List-Subscribe: <http://lists.osdl.org/mailman/listinfo/kernel-janitors>,
<mailto:[email protected]?subject=subscribe>
Errors-To: [email protected]
X-Spam-Score: 0.0 (/)

Description: remove check_region from eepro.c
(note that PnPWakeup must be defined to have this code compile)

drivers/net/eepro.c renamed from drivers/net/eepro.orig +5 -4
@@ -545,9 +545,9 @@ static int __init do_eepro_probe(struct 
 
 	{
 		unsigned short int WS[32]=WakeupSeq;
-
-		if (check_region(WakeupPort, 2)==0) {
-
+		if (!request_region(WakeupPort, 2, dev->name))
+			printk(KERN_WARNING "PnPWakeup Port not available");
+		else { 
 			if (net_debug>5)
 				printk(KERN_DEBUG "Waking UP\n");
 
@@ -557,7 +557,8 @@ static int __init do_eepro_probe(struct 
 				outb_p(WS[i],WakeupPort);
 				if (net_debug>5) printk(KERN_DEBUG ": %#x ",WS[i]);
 			}
-		} else printk(KERN_WARNING "Checkregion Failed!\n");
+			release_region(WakeupPort, 2);
+		}
 	}
 #endif
 

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

----- End forwarded message -----

Signature · 6 lines
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors