usb:g_dnl: Add name parameter to g_dnl_bind_fixup function
New parameter, namely *name has been added to g_dnl_bind_fixup(). It is necessary (for compatibility reasons) to assign new USB idProduct and idVendor for different usb functions. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
This commit is contained in:
parent
7b412ab31f
commit
d6eae7b0b1
|
@ -275,7 +275,7 @@ int factoryset_setenv(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
int g_dnl_bind_fixup(struct usb_device_descriptor *dev)
|
int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
|
||||||
{
|
{
|
||||||
put_unaligned(factory_dat.usb_vendor_id, &dev->idVendor);
|
put_unaligned(factory_dat.usb_vendor_id, &dev->idVendor);
|
||||||
put_unaligned(factory_dat.usb_product_id, &dev->idProduct);
|
put_unaligned(factory_dat.usb_product_id, &dev->idProduct);
|
||||||
|
|
|
@ -126,7 +126,7 @@ static int g_dnl_config_register(struct usb_composite_dev *cdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
__weak
|
__weak
|
||||||
int g_dnl_bind_fixup(struct usb_device_descriptor *dev)
|
int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -153,7 +153,7 @@ static int g_dnl_bind(struct usb_composite_dev *cdev)
|
||||||
g_dnl_string_defs[1].id = id;
|
g_dnl_string_defs[1].id = id;
|
||||||
device_desc.iProduct = id;
|
device_desc.iProduct = id;
|
||||||
|
|
||||||
g_dnl_bind_fixup(&device_desc);
|
g_dnl_bind_fixup(&device_desc, cdev->driver->name);
|
||||||
ret = g_dnl_config_register(cdev);
|
ret = g_dnl_config_register(cdev);
|
||||||
if (ret)
|
if (ret)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include <linux/usb/ch9.h>
|
#include <linux/usb/ch9.h>
|
||||||
#include <linux/usb/gadget.h>
|
#include <linux/usb/gadget.h>
|
||||||
int g_dnl_bind_fixup(struct usb_device_descriptor *);
|
int g_dnl_bind_fixup(struct usb_device_descriptor *, const char *);
|
||||||
int g_dnl_register(const char *s);
|
int g_dnl_register(const char *s);
|
||||||
void g_dnl_unregister(void);
|
void g_dnl_unregister(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue