On 02/04/15 12:27, Sudip Mukherjee wrote: >> I looked in to it and the kernel seems to be one of the few places where this is done along with in line functions. Why do we need function pointers in the kernel, outside of device drivers is my real question and is there any way to do the code using them without function pointers at all, I am assuming no. > Suppose you are registering a pci driver, and you are telling the pci > layer that function xyz() is your probe function. incidentally, there > is also another driver which is also having a probe function called > xyz(). if you do not give the pointer to your function and pci layer > starts calling the functions by its name , then which xyz() should be > executed now??? > > regards > sudip > >> Thanks, >> Nick That would not compile for the very reason of name conflict, if the functions would be in the same namespace... But the question also read "Why do we need function pointers in the kernel, outside of device drivers is " _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies