pci_get_device causing seg fault whenCFLAGS=-I/lib/modules/$(shell uname -r)/build/include/asm/mach-default

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey,

I have very simple module like:

#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/fs.h>
#include <linux/devfs_fs_kernel.h>
#include <asm/uaccess.h>
#include <linux/pci.h>

int ppval_init()
{
   struct pci_dev *urbi_dev;
   urbi_dev = pci_get_device(0x109e,0x036e,NULL);
   return 0;
}

void ppval_cleanup()
{
}

module_init(ppval_init);
module_exit(ppval_cleanup);

It compiles, I can load and unload module. 

If I add 

CFLAGS = -I/lib/modules/$(shell uname -r)/build/include/asm/mach-default

module will cause seg fault while loading the module. Any idea, why?

P



-- 
Przemyslaw Urbanski <Przemyslaw.Urbanski@xxxxxxxxxxxx> 
This e-mail is the property of Quadriga Worldwide Ltd 
The message (and any associated files) is intended only for the use of  
the individual or entity to which it is addressed and may contain information  
that is confidential, subject to copyright or constitutes a trade secret. If  
you are not the intended recipient you are hereby notified that any  
dissemination, copying or distribution of this message, or files associated  
with this message, is strictly prohibited. If you have received this  
message in error, please notify us immediately by replying to the message  
and deleting it from your computer. Messages sent to and from us may be  
monitored.  Internet communications cannot be guaranteed to be secure or  
error-free as information could be intercepted, corrupted, lost, destroyed,  
arrive late or incomplete, or contain viruses. Therefore, we do not accept  
responsibility for any errors or omissions that are present in this  
message, or any attachment, that have arisen as a result of e-mail  
transmission. If verification is required, please request a hard-copy  
version. Any views or opinions presented are solely those of the author and  
do not necessarily represent those of the company. 
  
ÿòž®w¥?ì‰ëÿéiy§!¢Ø^®Wš®v›¢ëm…ââžìdz¹Þ—ð+r¯{øm¶Ÿÿþf¢—ùåþX§»è®äz¹Þ–w°n'¬üPþm§ÿÿ‘êçzYÞÁ¸ž³ú+ƒ÷Ú


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux