ALSA: firewire-digi00x: enclose identifiers referred by single function
[linux-2.6-block.git] / sound / firewire / digi00x / digi00x-hwdep.c
index f188e4758fd295ecb9a3db341c1c6606d40d06c4..463c6b8e864d025bae08b931705c0fae2d71d952 100644 (file)
@@ -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;