pHciDev = hci_alloc_dev();-> should it be pHciDev = (struct hci_dev *) hci_alloc_dev();?
On Tue, Sep 13, 2011 at 9:56 PM, ravi sharma <sharmaravi...@gmail.com>wrote: > Hello All, > > We are facing a issue with function pointer address getting > corrupted .From the character driver init function, we are calling a > blueZ function which take pointer to structure. below is the code > snippet: > > --in char driver init function.. > struct hci_dev *pHciDev = NULL; > > pHciDev = hci_alloc_dev(); > //f1 & f2 are function defined in the char driver > pHciDev->send = f1; > pHciDev->open = f2; > > hci_register_dev(pHciDev); > > when we print the content of pHciDev in init module before passing to > hci_register_dev & in hci_register_dev, we found that the function > pointer address gets corrupted (sometimes swapped ). > > Even, we found that sometimes it works.Any help will be highly > appreciated. > > We found that it also happening with the addresses which are passing in the > structure. > > Thanks, > Rsh. > > -- > unsubscribe: android-kernel+unsubscr...@googlegroups.com > website: http://groups.google.com/group/android-kernel -- unsubscribe: android-kernel+unsubscr...@googlegroups.com website: http://groups.google.com/group/android-kernel