]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - sound/core/hwdep.c
ALSA: hwdep: Take private_data as drvdata for sysfs
[karo-tx-linux.git] / sound / core / hwdep.c
index 99f7e8515ba139069c4857c864b5636f3fb432bb..825cd2847940057fd9b02fc7d5e8fd295fe79f10 100644 (file)
@@ -441,6 +441,8 @@ static int snd_hwdep_dev_register(struct snd_device *device)
                struct device *d = snd_get_device(SNDRV_DEVICE_TYPE_HWDEP,
                                                  hwdep->card, hwdep->device);
                if (d) {
+                       if (hwdep->private_data)
+                               dev_set_drvdata(d, hwdep->private_data);
                        err = sysfs_create_groups(&d->kobj, hwdep->groups);
                        if (err < 0)
                                dev_warn(card->dev,