From patchwork Fri Feb 6 14:51:11 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Rorvick X-Patchwork-Id: 5792321 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5BE699F336 for ; Fri, 6 Feb 2015 14:53:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 78719201B4 for ; Fri, 6 Feb 2015 14:53:24 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 148CA20172 for ; Fri, 6 Feb 2015 14:53:23 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id B777D265200; Fri, 6 Feb 2015 15:53:21 +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, 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 A83A22651CE; Fri, 6 Feb 2015 15:52:07 +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 B8DE226522E; Fri, 6 Feb 2015 15:52:05 +0100 (CET) Received: from mail-yh0-f44.google.com (mail-yh0-f44.google.com [209.85.213.44]) by alsa0.perex.cz (Postfix) with ESMTP id 15DE32605E8 for ; Fri, 6 Feb 2015 15:51:36 +0100 (CET) Received: by mail-yh0-f44.google.com with SMTP id i57so6402906yha.3 for ; Fri, 06 Feb 2015 06:51:35 -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=KCruQ83MbHTM2a0aMf+uPG1ausWOjkVN3NXUlcWynF0=; b=RXnVzsgq4Nrrvs062ylwsrqOrwanrK7Vmk9LgjTVl8+SvEnUhYQa+2rAXZ8+bCuLqT wq8Evp1rkK2G5vDQzGmcyuzJf+4vNLk76tCEsF1Lit6qP8z97ZjpmATvZ/k0tecMyNxT QRWji6TTOzT/89/282hD6VqnQ8rgNXXcd6cwvKL0Nn/Dlgn3ZpxU/ioKpg63j+9vI59B PIL4N1jX8bMMj/7cIDgdtCfa+Uk04I7EJcD58/SHwXFvVs2D1wBUb8JU52kuebKgFs5b BHy9IQXpSV32Jn2y2o5ZxMYK+wYgn4bcrmeMNzIex5DTx8W4jJ2TQjzMDV5tjXMKYodA WG9Q== X-Received: by 10.170.207.8 with SMTP id y8mr1622953yke.55.1423234295475; Fri, 06 Feb 2015 06:51:35 -0800 (PST) Received: from localhost.localdomain.localdomain ([173.209.212.239]) by mx.google.com with ESMTPSA id a91sm690467yhq.17.2015.02.06.06.51.30 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Feb 2015 06:51:32 -0800 (PST) From: Chris Rorvick To: Takashi Iwai Date: Fri, 6 Feb 2015 08:51:11 -0600 Message-Id: <1423234272-7348-4-git-send-email-chris@rorvick.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1423234272-7348-1-git-send-email-chris@rorvick.com> References: <1423234272-7348-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 3/4] 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 descriptive name for each driver instead of calling all of them "line6usb". 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 e2a2603..626b0c3 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 2276b78..92a662a 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..4c3d8cb 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, "Line 6 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..f0a761b 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, "Line 6 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 b2c0b2c..53c0fbd 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, "Line 6 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..6f35c96 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, "Line 6 Variax", &variax_properties_table[id->driver_info], variax_init, sizeof(struct usb_line6_variax)); }