From patchwork Sat Feb 7 16:43:19 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Rorvick X-Patchwork-Id: 5796321 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 978A5BF440 for ; Sat, 7 Feb 2015 16:45:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1D9F20155 for ; Sat, 7 Feb 2015 16:45:45 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 5FF382012E for ; Sat, 7 Feb 2015 16:45:44 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id 5EB9526065D; Sat, 7 Feb 2015 17:45:43 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, NO_DNS_FOR_FROM, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=no version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 8BAAB260620; Sat, 7 Feb 2015 17:44:32 +0100 (CET) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 6922C260616; Sat, 7 Feb 2015 17:44:30 +0100 (CET) Received: from mail-ie0-f169.google.com (mail-ie0-f169.google.com [209.85.223.169]) by alsa0.perex.cz (Postfix) with ESMTP id BFB5F2605C4 for ; Sat, 7 Feb 2015 17:44:14 +0100 (CET) Received: by iecrp18 with SMTP id rp18so3664003iec.10 for ; Sat, 07 Feb 2015 08:44:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=8GvFsz2MHngH45aTcWeEp6emlJTzjvw0643TaC70pCI=; b=iprApxhCsLHE7m6wlMnJ3gQUP5amBKX1Df7cJ7OtJNySrqrV76GAwWSZdUj4m2dvab jKVnNcEKvuGdBFSNZz4crpB8H3hW3PUGHvzkx08UMHdjbGcDDgqRCT6tFOAyr4AdN1DV 6f+YliVjI2owX9J4vuG8DdqpukZd0VqqxOnRbD1z3+il4QwAw7PEpKC7LTRROP3l74kR a/sRZ0/r24rN291Aoa2asGB5HBN3T2PKfSPcH976OZ3pTOW0O87EM490yw9P5PZmep6f ii6Uea6DdZswAXdBId5v/1gxDuHrtBA1euBxFMuqTMCeIUv/7QCFxJnwZb6xwfq9J83n bqfQ== X-Received: by 10.107.40.131 with SMTP id o125mr8884999ioo.5.1423327454177; Sat, 07 Feb 2015 08:44:14 -0800 (PST) Received: from localhost.localdomain.com (adsl-99-142-29-188.dsl.emhril.sbcglobal.net. [99.142.29.188]) by mx.google.com with ESMTPSA id m77sm3245278iom.38.2015.02.07.08.44.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 07 Feb 2015 08:44:13 -0800 (PST) From: Chris Rorvick To: Takashi Iwai Date: Sat, 7 Feb 2015 10:43:19 -0600 Message-Id: <1423327399-12619-4-git-send-email-chris@rorvick.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1423327399-12619-1-git-send-email-chris@rorvick.com> References: <1423327399-12619-1-git-send-email-chris@rorvick.com> Cc: Stefan Hajnoczi , alsa-devel@alsa-project.org, Chris Rorvick , linux-kernel@vger.kernel.org Subject: [alsa-devel] [PATCH v2 3/3] ALSA: line6: Pass driver name to line6_probe() X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Provide a unique name for each driver instead of using "line6usb" for all of them. This will allow for different configurations based on the driver type. Signed-off-by: Chris Rorvick --- sound/usb/line6/driver.c | 3 ++- sound/usb/line6/driver.h | 3 +-- sound/usb/line6/pod.c | 2 +- sound/usb/line6/podhd.c | 2 +- sound/usb/line6/toneport.c | 2 +- sound/usb/line6/variax.c | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/usb/line6/driver.c b/sound/usb/line6/driver.c index 2328ec9..1e58e92 100644 --- a/sound/usb/line6/driver.c +++ b/sound/usb/line6/driver.c @@ -480,6 +480,7 @@ static int line6_init_cap_control(struct usb_line6 *line6) */ int line6_probe(struct usb_interface *interface, const struct usb_device_id *id, + const char *driver_name, const struct line6_properties *properties, int (*private_init)(struct usb_line6 *, const struct usb_device_id *id), size_t data_size) @@ -511,7 +512,7 @@ int line6_probe(struct usb_interface *interface, line6->ifcdev = &interface->dev; strcpy(card->id, properties->id); - strcpy(card->driver, DRIVER_NAME); + strcpy(card->driver, driver_name); strcpy(card->shortname, properties->name); sprintf(card->longname, "Line 6 %s at USB %s", properties->name, dev_name(line6->ifcdev)); diff --git a/sound/usb/line6/driver.h b/sound/usb/line6/driver.h index fa877a3..8247a6b 100644 --- a/sound/usb/line6/driver.h +++ b/sound/usb/line6/driver.h @@ -18,8 +18,6 @@ #include "midi.h" -#define DRIVER_NAME "line6usb" - #define USB_INTERVALS_PER_SECOND 1000 /* Fallback USB interval and max packet size values */ @@ -168,6 +166,7 @@ extern int line6_write_data(struct usb_line6 *line6, int address, void *data, int line6_probe(struct usb_interface *interface, const struct usb_device_id *id, + const char *driver_name, const struct line6_properties *properties, int (*private_init)(struct usb_line6 *, const struct usb_device_id *id), size_t data_size); diff --git a/sound/usb/line6/pod.c b/sound/usb/line6/pod.c index 61aadd7..c4246ad 100644 --- a/sound/usb/line6/pod.c +++ b/sound/usb/line6/pod.c @@ -574,7 +574,7 @@ static const struct line6_properties pod_properties_table[] = { static int pod_probe(struct usb_interface *interface, const struct usb_device_id *id) { - return line6_probe(interface, id, + return line6_probe(interface, id, "Line6-POD", &pod_properties_table[id->driver_info], pod_init, sizeof(struct usb_line6_pod)); } diff --git a/sound/usb/line6/podhd.c b/sound/usb/line6/podhd.c index 9c3c744..63dcaef 100644 --- a/sound/usb/line6/podhd.c +++ b/sound/usb/line6/podhd.c @@ -169,7 +169,7 @@ static const struct line6_properties podhd_properties_table[] = { static int podhd_probe(struct usb_interface *interface, const struct usb_device_id *id) { - return line6_probe(interface, id, + return line6_probe(interface, id, "Line6-PODHD", &podhd_properties_table[id->driver_info], podhd_init, sizeof(struct usb_line6)); } diff --git a/sound/usb/line6/toneport.c b/sound/usb/line6/toneport.c index 2420d2f..1a0a485 100644 --- a/sound/usb/line6/toneport.c +++ b/sound/usb/line6/toneport.c @@ -557,7 +557,7 @@ static const struct line6_properties toneport_properties_table[] = { static int toneport_probe(struct usb_interface *interface, const struct usb_device_id *id) { - return line6_probe(interface, id, + return line6_probe(interface, id, "Line6-TonePort", &toneport_properties_table[id->driver_info], toneport_init, sizeof(struct usb_line6_toneport)); } diff --git a/sound/usb/line6/variax.c b/sound/usb/line6/variax.c index b1c1de6..ddc23dd 100644 --- a/sound/usb/line6/variax.c +++ b/sound/usb/line6/variax.c @@ -283,7 +283,7 @@ static const struct line6_properties variax_properties_table[] = { static int variax_probe(struct usb_interface *interface, const struct usb_device_id *id) { - return line6_probe(interface, id, + return line6_probe(interface, id, "Line6-Variax", &variax_properties_table[id->driver_info], variax_init, sizeof(struct usb_line6_variax)); }