diff options
Diffstat (limited to 'sound/soc/codecs/tas2552.c')
-rw-r--r-- | sound/soc/codecs/tas2552.c | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index 4f25a7d..e3a0bca 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -38,7 +38,7 @@ #include "tas2552.h" -static struct reg_default tas2552_reg_defs[] = { +static const struct reg_default tas2552_reg_defs[] = { {TAS2552_CFG_1, 0x22}, {TAS2552_CFG_3, 0x80}, {TAS2552_DOUT, 0x00}, @@ -493,8 +493,7 @@ static int tas2552_runtime_suspend(struct device *dev) regcache_cache_only(tas2552->regmap, true); regcache_mark_dirty(tas2552->regmap); - if (tas2552->enable_gpio) - gpiod_set_value(tas2552->enable_gpio, 0); + gpiod_set_value(tas2552->enable_gpio, 0); return 0; } @@ -503,8 +502,7 @@ static int tas2552_runtime_resume(struct device *dev) { struct tas2552_data *tas2552 = dev_get_drvdata(dev); - if (tas2552->enable_gpio) - gpiod_set_value(tas2552->enable_gpio, 1); + gpiod_set_value(tas2552->enable_gpio, 1); tas2552_sw_shutdown(tas2552, 0); @@ -520,7 +518,7 @@ static const struct dev_pm_ops tas2552_pm = { NULL) }; -static struct snd_soc_dai_ops tas2552_speaker_dai_ops = { +static const struct snd_soc_dai_ops tas2552_speaker_dai_ops = { .hw_params = tas2552_hw_params, .prepare = tas2552_prepare, .set_sysclk = tas2552_set_dai_sysclk, @@ -585,8 +583,7 @@ static int tas2552_codec_probe(struct snd_soc_codec *codec) return ret; } - if (tas2552->enable_gpio) - gpiod_set_value(tas2552->enable_gpio, 1); + gpiod_set_value(tas2552->enable_gpio, 1); ret = pm_runtime_get_sync(codec->dev); if (ret < 0) { @@ -610,8 +607,7 @@ static int tas2552_codec_probe(struct snd_soc_codec *codec) return 0; probe_fail: - if (tas2552->enable_gpio) - gpiod_set_value(tas2552->enable_gpio, 0); + gpiod_set_value(tas2552->enable_gpio, 0); regulator_bulk_disable(ARRAY_SIZE(tas2552->supplies), tas2552->supplies); @@ -624,8 +620,7 @@ static int tas2552_codec_remove(struct snd_soc_codec *codec) pm_runtime_put(codec->dev); - if (tas2552->enable_gpio) - gpiod_set_value(tas2552->enable_gpio, 0); + gpiod_set_value(tas2552->enable_gpio, 0); return 0; }; @@ -769,7 +764,6 @@ MODULE_DEVICE_TABLE(of, tas2552_of_match); static struct i2c_driver tas2552_i2c_driver = { .driver = { .name = "tas2552", - .owner = THIS_MODULE, .of_match_table = of_match_ptr(tas2552_of_match), .pm = &tas2552_pm, }, |