request_mem_region() can fail if the memory requested is already allocated to some other device.
If you are programming a pci card you should use PCI API for querying information about required memory regions and then map/unmap those regions using 'ioremap/iounmap' in your driver. You can read pci.txt in Documentation dir. of kernel to learn PCI API.
Hope this helps.
Regards,
- Meraj
vasant j <vasant.embsys@xxxxxxxxx> wrote:
Hi all,I am new to linux programming....i am programming for PCI card.....My problem is i have used "request_mem_region( )" command and requested for 1k of memory.....It is returning failure.How to tackle this....i did like this :char *p;p=request_mem_region(0x2000,0xb,"pci");it is returning null !...(failure) .should i fill the struct resource elements.... and then do it or can i directly request for the memory from the given location.....as i did nowKindly reply to me regarding this As soon As possible....
Check out the hottest 2008 models today at Yahoo! Autos.