summaryrefslogtreecommitdiff
path: root/sound/firewire/digi00x/digi00x-hwdep.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2017-01-05 21:48:11 +0900
committerTakashi Iwai <tiwai@suse.de>2017-01-05 16:58:07 +0100
commita4e86cba09c9e2bb64af018544a7aed4a6a1b538 (patch)
tree35703238e9ba09df485715fcabec7ce3a34cf2ee /sound/firewire/digi00x/digi00x-hwdep.c
parentfcbe08d469bd3778e691e3b0f156d51f8b1ba2e4 (diff)
ALSA: firewire-digi00x: enclose identifiers referred by single function
Some identifiers are referred just by one functions. In this case, they can be put into the function definition. This brings two merits; readers can easily follow codes related to the identifiers, developers are free from name conflict. This commit moves such identifiers to each function definition. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire/digi00x/digi00x-hwdep.c')
-rw-r--r--sound/firewire/digi00x/digi00x-hwdep.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sound/firewire/digi00x/digi00x-hwdep.c b/sound/firewire/digi00x/digi00x-hwdep.c
index f188e4758fd2..463c6b8e864d 100644
--- a/sound/firewire/digi00x/digi00x-hwdep.c
+++ b/sound/firewire/digi00x/digi00x-hwdep.c
@@ -173,16 +173,15 @@ static int hwdep_compat_ioctl(struct snd_hwdep *hwdep, struct file *file,
#define hwdep_compat_ioctl NULL
#endif
-static const struct snd_hwdep_ops hwdep_ops = {
- .read = hwdep_read,
- .release = hwdep_release,
- .poll = hwdep_poll,
- .ioctl = hwdep_ioctl,
- .ioctl_compat = hwdep_compat_ioctl,
-};
-
int snd_dg00x_create_hwdep_device(struct snd_dg00x *dg00x)
{
+ static const struct snd_hwdep_ops ops = {
+ .read = hwdep_read,
+ .release = hwdep_release,
+ .poll = hwdep_poll,
+ .ioctl = hwdep_ioctl,
+ .ioctl_compat = hwdep_compat_ioctl,
+ };
struct snd_hwdep *hwdep;
int err;
@@ -192,7 +191,7 @@ int snd_dg00x_create_hwdep_device(struct snd_dg00x *dg00x)
strcpy(hwdep->name, "Digi00x");
hwdep->iface = SNDRV_HWDEP_IFACE_FW_DIGI00X;
- hwdep->ops = hwdep_ops;
+ hwdep->ops = ops;
hwdep->private_data = dg00x;
hwdep->exclusive = true;