* [PATCH] ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio
@ 2015-07-22 1:59 Axel Lin
2015-07-22 9:57 ` Applied "ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio" to the asoc tree Mark Brown
2015-07-30 21:47 ` [PATCH] ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio Tim Howe
0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2015-07-22 1:59 UTC (permalink / raw)
To: Mark Brown
Cc: Brian Austin, alsa-devel, Liam Girdwood, Paul Handrigan, Tim Howe
It's safe to call gpiod_set_value_cansleep() with NULL desc.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
sound/soc/codecs/cs4349.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c
index a7538ae..852be85 100644
--- a/sound/soc/codecs/cs4349.c
+++ b/sound/soc/codecs/cs4349.c
@@ -300,8 +300,7 @@ static int cs4349_i2c_probe(struct i2c_client *client,
if (IS_ERR(cs4349->reset_gpio))
return PTR_ERR(cs4349->reset_gpio);
- if (cs4349->reset_gpio)
- gpiod_set_value_cansleep(cs4349->reset_gpio, 1);
+ gpiod_set_value_cansleep(cs4349->reset_gpio, 1);
i2c_set_clientdata(client, cs4349);
@@ -316,8 +315,7 @@ static int cs4349_i2c_remove(struct i2c_client *client)
snd_soc_unregister_codec(&client->dev);
/* Hold down reset */
- if (cs4349->reset_gpio)
- gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
+ gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
return 0;
}
@@ -335,8 +333,7 @@ static int cs4349_runtime_suspend(struct device *dev)
regcache_cache_only(cs4349->regmap, true);
/* Hold down reset */
- if (cs4349->reset_gpio)
- gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
+ gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
return 0;
}
@@ -350,8 +347,7 @@ static int cs4349_runtime_resume(struct device *dev)
if (ret < 0)
return ret;
- if (cs4349->reset_gpio)
- gpiod_set_value_cansleep(cs4349->reset_gpio, 1);
+ gpiod_set_value_cansleep(cs4349->reset_gpio, 1);
regcache_cache_only(cs4349->regmap, false);
regcache_sync(cs4349->regmap);
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Applied "ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio" to the asoc tree
2015-07-22 1:59 [PATCH] ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio Axel Lin
@ 2015-07-22 9:57 ` Mark Brown
2015-07-30 21:47 ` [PATCH] ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio Tim Howe
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-07-22 9:57 UTC (permalink / raw)
To: Axel Lin, Mark Brown; +Cc: alsa-devel
The patch
ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio
has been applied to the asoc tree at
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 6a75c0b62b0981c3a34d3336725b0840747e7680 Mon Sep 17 00:00:00 2001
From: Axel Lin <axel.lin@ingics.com>
Date: Wed, 22 Jul 2015 09:59:47 +0800
Subject: [PATCH] ASoC: cs4349: Remove unneeded NULL test for
cs4349->reset_gpio
It's safe to call gpiod_set_value_cansleep() with NULL desc.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/codecs/cs4349.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/sound/soc/codecs/cs4349.c b/sound/soc/codecs/cs4349.c
index a7538aea7f99..852be858bb9f 100644
--- a/sound/soc/codecs/cs4349.c
+++ b/sound/soc/codecs/cs4349.c
@@ -300,8 +300,7 @@ static int cs4349_i2c_probe(struct i2c_client *client,
if (IS_ERR(cs4349->reset_gpio))
return PTR_ERR(cs4349->reset_gpio);
- if (cs4349->reset_gpio)
- gpiod_set_value_cansleep(cs4349->reset_gpio, 1);
+ gpiod_set_value_cansleep(cs4349->reset_gpio, 1);
i2c_set_clientdata(client, cs4349);
@@ -316,8 +315,7 @@ static int cs4349_i2c_remove(struct i2c_client *client)
snd_soc_unregister_codec(&client->dev);
/* Hold down reset */
- if (cs4349->reset_gpio)
- gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
+ gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
return 0;
}
@@ -335,8 +333,7 @@ static int cs4349_runtime_suspend(struct device *dev)
regcache_cache_only(cs4349->regmap, true);
/* Hold down reset */
- if (cs4349->reset_gpio)
- gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
+ gpiod_set_value_cansleep(cs4349->reset_gpio, 0);
return 0;
}
@@ -350,8 +347,7 @@ static int cs4349_runtime_resume(struct device *dev)
if (ret < 0)
return ret;
- if (cs4349->reset_gpio)
- gpiod_set_value_cansleep(cs4349->reset_gpio, 1);
+ gpiod_set_value_cansleep(cs4349->reset_gpio, 1);
regcache_cache_only(cs4349->regmap, false);
regcache_sync(cs4349->regmap);
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio
2015-07-22 1:59 [PATCH] ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio Axel Lin
2015-07-22 9:57 ` Applied "ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio" to the asoc tree Mark Brown
@ 2015-07-30 21:47 ` Tim Howe
1 sibling, 0 replies; 3+ messages in thread
From: Tim Howe @ 2015-07-30 21:47 UTC (permalink / raw)
To: Axel Lin
Cc: alsa-devel, Brian Austin, Paul Handrigan, Liam Girdwood,
Mark Brown, Tim Howe
On Tue, 21 Jul 2015, Axel Lin wrote:
> It's safe to call gpiod_set_value_cansleep() with NULL desc.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> sound/soc/codecs/cs4349.c | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
Great, thanks.
Acked-by: Tim Howe <tim.howe@cirrus.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-07-30 21:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-22 1:59 [PATCH] ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio Axel Lin
2015-07-22 9:57 ` Applied "ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio" to the asoc tree Mark Brown
2015-07-30 21:47 ` [PATCH] ASoC: cs4349: Remove unneeded NULL test for cs4349->reset_gpio Tim Howe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox