lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1420868171-2031-6-git-send-email-chris@rorvick.com>
Date:	Fri,  9 Jan 2015 23:35:51 -0600
From:	Chris Rorvick <chris@...vick.com>
To:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:	Chris Rorvick <chris@...vick.com>,
	Alexey Khoroshilov <khoroshilov@...ras.ru>,
	Davide Berardi <berardi.dav@...il.com>,
	devel@...verdev.osuosl.org,
	Fabian Mewes <architekt@...ing4coffee.org>,
	Gulsah Kose <gulsah.1004@...il.com>,
	Himangi Saraogi <himangi774@...il.com>,
	Jerry Snitselaar <dev@...tselaar.org>,
	L. Alberto Giménez <agimenez@...valve.es>,
	linux-kernel@...r.kernel.org, Mikhail Boiko <mm.boiko@...dex.ru>,
	Monam Agarwal <monamagarwal123@...il.com>,
	Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@...el.com>,
	Stefan Hajnoczi <stefanha@...il.com>,
	Takashi Iwai <tiwai@...e.de>
Subject: [PATCH 05/25] staging: line6: Define a device type enum

Define an enum containing the supported devices and associate each entry
in the device table to the respective value.

Signed-off-by: Chris Rorvick <chris@...vick.com>
---
 drivers/staging/line6/driver.c | 54 ++++++++++++++++++++++++++++--------------
 drivers/staging/line6/driver.h | 21 ++++++++++++++++
 2 files changed, 57 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/line6/driver.c b/drivers/staging/line6/driver.c
index a263bce..2797e41 100644
--- a/drivers/staging/line6/driver.c
+++ b/drivers/staging/line6/driver.c
@@ -34,24 +34,42 @@
 
 /* table of devices that work with this driver */
 static const struct usb_device_id line6_id_table[] = {
-	{ LINE6_DEVICE(LINE6_DEVID_BASSPODXT) },
-	{ LINE6_DEVICE(LINE6_DEVID_BASSPODXTLIVE) },
-	{ LINE6_DEVICE(LINE6_DEVID_BASSPODXTPRO) },
-	{ LINE6_DEVICE(LINE6_DEVID_GUITARPORT) },
-	{ LINE6_DEVICE(LINE6_DEVID_POCKETPOD) },
-	{ LINE6_DEVICE(LINE6_DEVID_PODHD300) },
-	{ LINE6_DEVICE(LINE6_DEVID_PODHD400) },
-	{ LINE6_DEVICE(LINE6_DEVID_PODHD500) },
-	{ LINE6_DEVICE(LINE6_DEVID_PODSTUDIO_GX) },
-	{ LINE6_DEVICE(LINE6_DEVID_PODSTUDIO_UX1) },
-	{ LINE6_DEVICE(LINE6_DEVID_PODSTUDIO_UX2) },
-	{ LINE6_DEVICE(LINE6_DEVID_PODXT) },
-	{ LINE6_DEVICE(LINE6_DEVID_PODXTLIVE) },
-	{ LINE6_DEVICE(LINE6_DEVID_PODXTPRO) },
-	{ LINE6_DEVICE(LINE6_DEVID_TONEPORT_GX) },
-	{ LINE6_DEVICE(LINE6_DEVID_TONEPORT_UX1) },
-	{ LINE6_DEVICE(LINE6_DEVID_TONEPORT_UX2) },
-	{ LINE6_DEVICE(LINE6_DEVID_VARIAX) },
+	{ LINE6_DEVICE(LINE6_DEVID_BASSPODXT),
+		.driver_info = LINE6_BASSPODXT },
+	{ LINE6_DEVICE(LINE6_DEVID_BASSPODXTLIVE),
+		.driver_info = LINE6_BASSPODXTLIVE },
+	{ LINE6_DEVICE(LINE6_DEVID_BASSPODXTPRO),
+		.driver_info = LINE6_BASSPODXTPRO },
+	{ LINE6_DEVICE(LINE6_DEVID_GUITARPORT),
+		.driver_info = LINE6_GUITARPORT },
+	{ LINE6_DEVICE(LINE6_DEVID_POCKETPOD),
+		.driver_info = LINE6_POCKETPOD },
+	{ LINE6_DEVICE(LINE6_DEVID_PODHD300),
+		.driver_info = LINE6_PODHD300 },
+	{ LINE6_DEVICE(LINE6_DEVID_PODHD400),
+		.driver_info = LINE6_PODHD400 },
+	{ LINE6_DEVICE(LINE6_DEVID_PODHD500),
+		.driver_info = LINE6_PODHD500 },
+	{ LINE6_DEVICE(LINE6_DEVID_PODSTUDIO_GX),
+		.driver_info = LINE6_PODSTUDIO_GX },
+	{ LINE6_DEVICE(LINE6_DEVID_PODSTUDIO_UX1),
+		.driver_info = LINE6_PODSTUDIO_UX1 },
+	{ LINE6_DEVICE(LINE6_DEVID_PODSTUDIO_UX2),
+		.driver_info = LINE6_PODSTUDIO_UX2 },
+	{ LINE6_DEVICE(LINE6_DEVID_PODXT),
+		.driver_info = LINE6_PODXT },
+	{ LINE6_DEVICE(LINE6_DEVID_PODXTLIVE),
+		.driver_info = LINE6_PODXTLIVE },
+	{ LINE6_DEVICE(LINE6_DEVID_PODXTPRO),
+		.driver_info = LINE6_PODXTPRO },
+	{ LINE6_DEVICE(LINE6_DEVID_TONEPORT_GX),
+		.driver_info = LINE6_TONEPORT_GX },
+	{ LINE6_DEVICE(LINE6_DEVID_TONEPORT_UX1),
+		.driver_info = LINE6_TONEPORT_UX1 },
+	{ LINE6_DEVICE(LINE6_DEVID_TONEPORT_UX2),
+		.driver_info = LINE6_TONEPORT_UX2 },
+	{ LINE6_DEVICE(LINE6_DEVID_VARIAX),
+		.driver_info = LINE6_VARIAX },
 	{}
 };
 
diff --git a/drivers/staging/line6/driver.h b/drivers/staging/line6/driver.h
index 1cc7532..8fb4a9c 100644
--- a/drivers/staging/line6/driver.h
+++ b/drivers/staging/line6/driver.h
@@ -20,6 +20,27 @@
 
 #define DRIVER_NAME "line6usb"
 
+enum line6_device_type {
+	LINE6_BASSPODXT,
+	LINE6_BASSPODXTLIVE,
+	LINE6_BASSPODXTPRO,
+	LINE6_GUITARPORT,
+	LINE6_POCKETPOD,
+	LINE6_PODHD300,
+	LINE6_PODHD400,
+	LINE6_PODHD500,
+	LINE6_PODSTUDIO_GX,
+	LINE6_PODSTUDIO_UX1,
+	LINE6_PODSTUDIO_UX2,
+	LINE6_PODXT,
+	LINE6_PODXTLIVE,
+	LINE6_PODXTPRO,
+	LINE6_TONEPORT_GX,
+	LINE6_TONEPORT_UX1,
+	LINE6_TONEPORT_UX2,
+	LINE6_VARIAX
+};
+
 #define LINE6_TIMEOUT 1
 #define LINE6_BUFSIZE_LISTEN 32
 #define LINE6_MESSAGE_MAXLEN 256
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ