lkml.org 
[lkml]   [2010]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] USB: g_serial: Allow to override the default VID/PID
Date
Override the default VID/PID if custom values are supplied through the
idVendor and idProduct kernel module parameters.

Signed-off-by: Jef Driesen <jefdriesen@telenet.be>
---
drivers/usb/gadget/serial.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/serial.c
index f46a609..77b410e 100644
--- a/drivers/usb/gadget/serial.c
+++ b/drivers/usb/gadget/serial.c
@@ -271,6 +271,11 @@ static int __init init(void)
}
strings_dev[STRING_DESCRIPTION_IDX].s = serial_config_driver.label;

+ if (idVendor)
+ device_desc.idVendor = idVendor;
+ if (idProduct)
+ device_desc.idProduct = idProduct;
+
return usb_composite_register(&gserial_driver);
}
module_init(init);
--
1.7.1


\
 
 \ /
  Last update: 2010-11-20 00:35    [W:0.038 / U:18.344 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site