On Wed, Nov 21, 2007 at 05:34:29PM +0530, vasant j wrote: > Hi , > > I want to use ioremap returned pointer as > global....in the driver......how can i do it.... > > > ex:- > > int *ptr; > > ptr=ioremap(args..); > > This 'ptr' i want to access as global.....how?.... Start reading the scriptures of our great prophets Kernighan and Ritchie[1], they will enlighten you. Other than that, a global variable is usually a bad idea, what if your driver has to drive more than one card? You can't share the pointer between those cards. Erik [1] Brian W. Kernighan and Dennis M. Ritchie, "The C programming language, second edition", Prentice Hall, 1988. -- They're all fools. Don't worry. Darwin may be slow, but he'll eventually get them. -- Matthew Lammers in alt.sysadmin.recovery
Attachment:
signature.asc
Description: Digital signature