On Thu, Jan 05, 2006 at 11:28:21PM +0000, Luca Risolia wrote: > Greg Kroah-Hartman wrote: > > >> + memcpy(&cam->dev, &udev->dev, sizeof(struct device)); > > > >No, you can not just copy a struct device into somewhere else, that's > >just not allowed at all. What do you want this for? Why not just > >access that pointer through > > cam->usbdev.dev > >instead if you need it? > > I only passed &cam->dev to dev_info(), dev_warn() > and dev_err() for debugging purposes. I think it's > safe: do you need another patch before > applying the actual source code?
It's not safe, as you are copying a referenced structure into another location. If all you need it for is the dev_* messages, use the pointer you already have in the usbdev structure. Please redo the whole patch, that will be easier for me to apply it. thanks, greg k-h ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel