summaryrefslogtreecommitdiff
path: root/sound/usb/usbmixer_maps.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2005-05-02 10:51:26 +0400
committerJaroslav Kysela <perex@suse.cz>2005-05-29 12:05:47 +0400
commit27d10f5664c7650af3b2ffadfefaf19b36dc7bd8 (patch)
treeb89c8d639041f460557bf6e9078c7cee7426cd2b /sound/usb/usbmixer_maps.c
parentb259b10c420a59a2fdbcf5a3498253ebcbdffa1e (diff)
downloadlinux-27d10f5664c7650af3b2ffadfefaf19b36dc7bd8.tar.xz
[ALSA] usb-audio - cache vendor/product IDs
USB generic driver Cache the decoded values of idVendor/idProduct to get rid of most of those ugly le16_to_cpu() calls. Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Diffstat (limited to 'sound/usb/usbmixer_maps.c')
-rw-r--r--sound/usb/usbmixer_maps.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/sound/usb/usbmixer_maps.c b/sound/usb/usbmixer_maps.c
index adb0abb3ee85..f05500b05ec0 100644
--- a/sound/usb/usbmixer_maps.c
+++ b/sound/usb/usbmixer_maps.c
@@ -33,8 +33,7 @@ struct usbmix_selector_map {
};
struct usbmix_ctl_map {
- int vendor;
- int product;
+ u32 id;
const struct usbmix_name_map *map;
const struct usbmix_selector_map *selector_map;
int ignore_ctl_error;
@@ -225,26 +224,26 @@ static struct usbmix_name_map justlink_map[] = {
static struct usbmix_ctl_map usbmix_ctl_maps[] = {
{
- .vendor = 0x41e, .product = 0x3000,
+ .id = USB_ID(0x041e, 0x3000),
.map = extigy_map,
.ignore_ctl_error = 1,
},
{
- .vendor = 0x41e, .product = 0x3010,
+ .id = USB_ID(0x041e, 0x3010),
.map = mp3plus_map,
},
{
- .vendor = 0x41e, .product = 0x3020,
+ .id = USB_ID(0x041e, 0x3020),
.map = audigy2nx_map,
.selector_map = audigy2nx_selectors,
},
{
- .vendor = 0x8bb, .product = 0x2702,
+ .id = USB_ID(0x08bb, 0x2702),
.map = linex_map,
.ignore_ctl_error = 1,
},
{
- .vendor = 0xc45, .product = 0x1158,
+ .id = USB_ID(0x0c45, 0x1158),
.map = justlink_map,
},
{ 0 } /* terminator */