Subject: Re: another question about bus_space_map
To: der Mouse <mouse@rodents.montreal.qc.ca>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 02/04/1997 12:08:19
On Tue, 4 Feb 1997 14:23:47 -0500 (EST) 
 der Mouse <mouse@Rodents.Montreal.QC.CA> wrote:

 > 	static int table_set_up = 0;
 > 	static unsigned int *table;
 > 	
 > 	static void maybe_set_up_table(void)
 > 	{
 > 		if (table_set_up) return;
 > 		...allocate *table and load it...
 > 		table_set_up = 1;
 > 	}
 > 	
 > 	xxx_match() {
 > 		maybe_set_up_table();
 > 		...check something on the bus using table[]...
 > 	}
 > 
 > Yet this is clearly forbidden by the dictum in question.  So, what am I
 > missing?

So, what happens if the autoconfiguration code decides _not_ to (for
whatever reason) attach the device even if the match succeeds?

Jason R. Thorpe                                       thorpej@nas.nasa.gov
NASA Ames Research Center                               Home: 408.866.1912
NAS: M/S 258-6                                          Work: 415.604.0935
Moffett Field, CA 94035                                Pager: 415.428.6939