diff options
author | Maxime Ripard <maxime@cerno.tech> | 2021-05-27 14:32:13 +0200 |
---|---|---|
committer | Maxime Ripard <maxime@cerno.tech> | 2021-05-27 14:32:13 +0200 |
commit | ffa52910faff64f2070af42c22d782c4572d889e (patch) | |
tree | 18c103f25a1467d02af1ebf27d7f0a8b177f5825 /sound/soc/codecs/cs43130.c | |
parent | 5ccbb2ee039f0bd81e2b34b670718186753a4e17 (diff) | |
parent | 5522e9f7b0fbe2a0cb89c199b574523becc8c3ab (diff) |
Merge drm/drm-next into drm-misc-next
i915 is broken without -rc3, let's bring that tag in to fix it.
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Diffstat (limited to 'sound/soc/codecs/cs43130.c')
-rw-r--r-- | sound/soc/codecs/cs43130.c | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/sound/soc/codecs/cs43130.c b/sound/soc/codecs/cs43130.c index 80bc7c10ed75..80cd3ea0c157 100644 --- a/sound/soc/codecs/cs43130.c +++ b/sound/soc/codecs/cs43130.c @@ -1735,6 +1735,14 @@ static DEVICE_ATTR(hpload_dc_r, 0444, cs43130_show_dc_r, NULL); static DEVICE_ATTR(hpload_ac_l, 0444, cs43130_show_ac_l, NULL); static DEVICE_ATTR(hpload_ac_r, 0444, cs43130_show_ac_r, NULL); +static struct attribute *hpload_attrs[] = { + &dev_attr_hpload_dc_l.attr, + &dev_attr_hpload_dc_r.attr, + &dev_attr_hpload_ac_l.attr, + &dev_attr_hpload_ac_r.attr, +}; +ATTRIBUTE_GROUPS(hpload); + static struct reg_sequence hp_en_cal_seq[] = { {CS43130_INT_MASK_4, CS43130_INT_MASK_ALL}, {CS43130_HP_MEAS_LOAD_1, 0}, @@ -2302,25 +2310,15 @@ static int cs43130_probe(struct snd_soc_component *component) cs43130->hpload_done = false; if (cs43130->dc_meas) { - ret = device_create_file(component->dev, &dev_attr_hpload_dc_l); - if (ret < 0) - return ret; - - ret = device_create_file(component->dev, &dev_attr_hpload_dc_r); - if (ret < 0) - return ret; - - ret = device_create_file(component->dev, &dev_attr_hpload_ac_l); - if (ret < 0) - return ret; - - ret = device_create_file(component->dev, &dev_attr_hpload_ac_r); - if (ret < 0) + ret = sysfs_create_groups(&component->dev->kobj, hpload_groups); + if (ret) return ret; cs43130->wq = create_singlethread_workqueue("cs43130_hp"); - if (!cs43130->wq) + if (!cs43130->wq) { + sysfs_remove_groups(&component->dev->kobj, hpload_groups); return -ENOMEM; + } INIT_WORK(&cs43130->work, cs43130_imp_meas); } |