aboutsummaryrefslogtreecommitdiffstats
path: root/sound/firewire/fireworks/fireworks_hwdep.c
diff options
context:
space:
mode:
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>2017-01-05 21:48:08 +0900
committerTakashi Iwai <tiwai@suse.de>2017-01-05 16:58:03 +0100
commit7cdc887a00d79a1553009eb7afd308882e4b74d5 (patch)
tree3b6fc7167b4a1a9c3089343dc4ecf96c654232f7 /sound/firewire/fireworks/fireworks_hwdep.c
parentALSA: bebob: enclose identifiers referred by single function (diff)
downloadlinux-dev-7cdc887a00d79a1553009eb7afd308882e4b74d5.tar.xz
linux-dev-7cdc887a00d79a1553009eb7afd308882e4b74d5.zip
ALSA: fireworks: 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/fireworks/fireworks_hwdep.c')
-rw-r--r--sound/firewire/fireworks/fireworks_hwdep.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/sound/firewire/fireworks/fireworks_hwdep.c b/sound/firewire/fireworks/fireworks_hwdep.c
index 2e1d9a23920c..a3a3a16f5e08 100644
--- a/sound/firewire/fireworks/fireworks_hwdep.c
+++ b/sound/firewire/fireworks/fireworks_hwdep.c
@@ -303,17 +303,16 @@ 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,
- .write = hwdep_write,
- .release = hwdep_release,
- .poll = hwdep_poll,
- .ioctl = hwdep_ioctl,
- .ioctl_compat = hwdep_compat_ioctl,
-};
-
int snd_efw_create_hwdep_device(struct snd_efw *efw)
{
+ static const struct snd_hwdep_ops ops = {
+ .read = hwdep_read,
+ .write = hwdep_write,
+ .release = hwdep_release,
+ .poll = hwdep_poll,
+ .ioctl = hwdep_ioctl,
+ .ioctl_compat = hwdep_compat_ioctl,
+ };
struct snd_hwdep *hwdep;
int err;
@@ -322,7 +321,7 @@ int snd_efw_create_hwdep_device(struct snd_efw *efw)
goto end;
strcpy(hwdep->name, "Fireworks");
hwdep->iface = SNDRV_HWDEP_IFACE_FW_FIREWORKS;
- hwdep->ops = hwdep_ops;
+ hwdep->ops = ops;
hwdep->private_data = efw;
hwdep->exclusive = true;
end: