X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=drivers%2Fusb%2Fgadget%2Fcomposite.c;h=7bd25629c8ca5124b009df2b06dd423334ed7898;hb=4b19b7448e63bab8af17abbb30acff00d8f0dc99;hp=f30778a163b2950b2681a5ea9b610a7d74d10fb3;hpb=348e47f766ac228fb02d1af562b2e9a4c69355db;p=u-boot diff --git a/drivers/usb/gadget/composite.c b/drivers/usb/gadget/composite.c index f30778a163..7bd25629c8 100644 --- a/drivers/usb/gadget/composite.c +++ b/drivers/usb/gadget/composite.c @@ -4,19 +4,7 @@ * Copyright (C) 2006-2008 David Brownell * U-boot porting: Lukasz Majewski * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * SPDX-License-Identifier: GPL-2.0+ */ #undef DEBUG @@ -997,7 +985,8 @@ static int composite_bind(struct usb_gadget *gadget) if (status < 0) goto fail; - cdev->desc = *composite->dev; + memcpy(&cdev->desc, composite->dev, + sizeof(struct usb_device_descriptor)); cdev->desc.bMaxPacketSize0 = gadget->ep0->maxpacket; debug("%s: ready\n", composite->name);