[PATCH] [UBUNTU:sound/pci{,/emu10k1}/] Miscellaneous cleanups
crimsun at fungus.sh.nu
crimsun at fungus.sh.nu
Thu Aug 17 06:15:08 UTC 2006
From edfc4295a6cdf26ac482dfa6d41878b01ffd0aa1 Mon Sep 17 00:00:00 2001
From: Daniel T. Chen <crimsun at garnish.localdomain>
Date: Thu, 17 Aug 2006 00:57:36 -0400
Subject: [PATCH] [UBUNTU:sound/pci{,/emu10k1}/] Miscellaneous cleanups
UpstreamStatus: Added in upstream alsa-kernel hg changesets:
9ce0a25b0803 [http://hg-mirror.alsa-project.org/alsa-kernel?cmd=changeset;node=9ce0a25b0803c469fc499cbb5c427721058f14e1;style=raw],
fa3b3265b374 [http://hg-mirror.alsa-project.org/alsa-kernel?cmd=changeset;node=fa3b3265b374cb47ee0bd9dbb73a6ceff6b687e3;style=raw]
The former commit simplifies fm801.c to use the ARRAY_SIZE macro.
Signed-off-by: Tobias Klauser <tklauser at distanz.ch>
Signed-off-by: Andrew Morton <akpm at osdl.org>
The latter commit simplifies the call to pci_register_driver() in
emu10k1x.c, allowing errors to be propagated properly to modprobe.
Signed-off-by: Alexey Dobriyan <adobriyan at gmail.com>
Signed-off-by: Andrew Morton <akpm at osdl.org>
Signed-off-by: Daniel T Chen <crimsun at ubuntu.com>
---
sound/pci/emu10k1/emu10k1x.c | 7 +------
sound/pci/fm801.c | 4 +---
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c
index bd7e6ca..44a28c8 100644
--- a/sound/pci/emu10k1/emu10k1x.c
+++ b/sound/pci/emu10k1/emu10k1x.c
@@ -1640,12 +1640,7 @@ static struct pci_driver driver = {
// initialization of the module
static int __init alsa_card_emu10k1x_init(void)
{
- int err;
-
- if ((err = pci_register_driver(&driver)) > 0)
- return err;
-
- return 0;
+ return pci_register_driver(&driver);
}
// clean up the module
diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index 4e1d343..1a53460 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -311,10 +311,8 @@ static unsigned int channels[] = {
2, 4, 6
};
-#define CHANNELS sizeof(channels) / sizeof(channels[0])
-
static snd_pcm_hw_constraint_list_t hw_constraints_channels = {
- .count = CHANNELS,
+ .count = ARRAY_SIZE(channels),
.list = channels,
.mask = 0,
};
--
1.4.1
--
Daniel T. Chen crimsun at ubuntu.com
GPG key: 0xC88ABDA3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20060816/279197cf/attachment.sig>
More information about the kernel-team
mailing list