diff options
author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2017-01-05 21:48:08 +0900 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2017-01-05 16:58:03 +0100 |
commit | 7cdc887a00d79a1553009eb7afd308882e4b74d5 (patch) | |
tree | 3b6fc7167b4a1a9c3089343dc4ecf96c654232f7 /sound/firewire/fireworks/fireworks_hwdep.c | |
parent | 4780f774f99129f1650d250e346d5bfba98d9f4f (diff) |
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.c | 19 |
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: |