diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2017-01-05 15:48:12 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-01-05 18:58:10 +0300 |
commit | 921282360b9c9bf34c75cd18bb90f298c4f4ebc8 (patch) | |
tree | 99e4cd5b018acf67037b868257df43df6275f89a /sound/firewire/tascam/tascam-hwdep.c | |
parent | a4e86cba09c9e2bb64af018544a7aed4a6a1b538 (diff) | |
download | linux-921282360b9c9bf34c75cd18bb90f298c4f4ebc8.tar.xz |
ALSA: firewire-tascam: 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/tascam/tascam-hwdep.c')
-rw-r--r-- | sound/firewire/tascam/tascam-hwdep.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sound/firewire/tascam/tascam-hwdep.c b/sound/firewire/tascam/tascam-hwdep.c index 106406cbfaa3..8c4437d0051d 100644 --- a/sound/firewire/tascam/tascam-hwdep.c +++ b/sound/firewire/tascam/tascam-hwdep.c @@ -163,16 +163,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_tscm_create_hwdep_device(struct snd_tscm *tscm) { + 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; @@ -182,7 +181,7 @@ int snd_tscm_create_hwdep_device(struct snd_tscm *tscm) strcpy(hwdep->name, "Tascam"); hwdep->iface = SNDRV_HWDEP_IFACE_FW_TASCAM; - hwdep->ops = hwdep_ops; + hwdep->ops = ops; hwdep->private_data = tscm; hwdep->exclusive = true; |