From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751727AbbJaFhr (ORCPT ); Sat, 31 Oct 2015 01:37:47 -0400 Received: from mga02.intel.com ([134.134.136.20]:47491 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751049AbbJaFhq (ORCPT ); Sat, 31 Oct 2015 01:37:46 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,222,1444719600"; d="scan'208";a="839833377" Subject: Re: [PATCH 11/12] usb: serial: usb_debug: add support for dbc debug device To: Greg Kroah-Hartman References: <1446019243-5565-1-git-send-email-baolu.lu@linux.intel.com> <1446019243-5565-12-git-send-email-baolu.lu@linux.intel.com> <20151028123319.GA6856@kroah.com> <563358A5.7000703@linux.intel.com> <20151030144148.GD27072@kroah.com> Cc: Mathias Nyman , Alan Stern , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org From: "Lu, Baolu" Message-ID: <563453A9.8060800@linux.intel.com> Date: Sat, 31 Oct 2015 13:37:45 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <20151030144148.GD27072@kroah.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/30/2015 10:41 PM, Greg Kroah-Hartman wrote: > On Fri, Oct 30, 2015 at 07:46:45PM +0800, Lu, Baolu wrote: >> >> On 10/28/2015 08:33 PM, Greg Kroah-Hartman wrote: >>> On Wed, Oct 28, 2015 at 04:00:42PM +0800, Lu Baolu wrote: >>>> This patch add dbc debug device support in usb_debug driver. >>>> >>>> Signed-off-by: Lu Baolu >>>> --- >>>> drivers/usb/serial/usb_debug.c | 29 ++++++++++++++++++++++++++--- >>>> 1 file changed, 26 insertions(+), 3 deletions(-) >>>> >>>> diff --git a/drivers/usb/serial/usb_debug.c b/drivers/usb/serial/usb_debug.c >>>> index ca2fa5b..d4903b0 100644 >>>> --- a/drivers/usb/serial/usb_debug.c >>>> +++ b/drivers/usb/serial/usb_debug.c >>>> @@ -32,7 +32,18 @@ static const struct usb_device_id id_table[] = { >>>> { USB_DEVICE(0x0525, 0x127a) }, >>>> { }, >>>> }; >>>> -MODULE_DEVICE_TABLE(usb, id_table); >>>> + >>>> +static const struct usb_device_id dbc_id_table[] = { >>>> + { USB_DEVICE(0x1d6b, 0x0004) }, >>>> + { }, >>>> +}; >>>> + >>>> +static const struct usb_device_id id_table_combined[] = { >>>> + { USB_DEVICE(0x0525, 0x127a) }, >>>> + { USB_DEVICE(0x1d6b, 0x0004) }, >>>> + { }, >>>> +}; >>>> +MODULE_DEVICE_TABLE(usb, id_table_combined); >>> You shouldn't need a "combined" module device table anymore, the module >>> core was changed a while ago to remove that restriction, you should be >>> able to just multiple exports of MODULE_DEVICE_TABLE and everything >>> should "just work" on the export side. Now it might not work on the usb >>> core side, but that's a different issue... >> Before I dive into the serial driver code, can anybody tell me, if >> I remove the "combined" module device table, what should I >> specify the second parameter for module_usb_serial_driver()? >> >> The previous declaration is, >> >> module_usb_serial_driver(serial_drivers, id_table_combined); > Yeah, that's the issue I was alluding to here, maybe this will not work > just yet for USB serial drivers, sorry to lead you down the wrong path. > Your original patch should be fine for now. Okay, I will keep that patch. > > thanks, > > greg k-h Thanks, Baolu > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ >