On Thu, Jan 05, 2006 at 06:20:39PM +0000, Luca Risolia wrote:
> +     if (!(cam = kmalloc(sizeof(struct et61x251_device), GFP_KERNEL)))
> +             return -ENOMEM;
> +
> +     cam->usbdev = udev;

That's fine.

> +     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?

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

Reply via email to