From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: linux-i2c@vger.kernel.org
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
Takashi Iwai <tiwai@suse.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Haojian Zhuang <haojian.zhuang@gmail.com>,
Jaroslav Kysela <perex@perex.cz>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
Mark Brown <broonie@kernel.org>,
linux-arm-kernel@lists.infradead.org,
Robert Jarzmik <robert.jarzmik@free.fr>,
Daniel Mack <daniel@zonque.org>
Subject: [PATCH 1/1] ASoC: pxa: magician: convert to use i2c_new_client_device()
Date: Thu, 26 Mar 2020 22:10:10 +0100 [thread overview]
Message-ID: <20200326211010.13471-2-wsa+renesas@sang-engineering.com> (raw)
In-Reply-To: <20200326211010.13471-1-wsa+renesas@sang-engineering.com>
Move away from the deprecated API and return the shiny new ERRPTR where
useful.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
sound/soc/pxa/magician.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sound/soc/pxa/magician.c b/sound/soc/pxa/magician.c
index 6483cff5b73d..3bafd86bfb93 100644
--- a/sound/soc/pxa/magician.c
+++ b/sound/soc/pxa/magician.c
@@ -358,10 +358,10 @@ static int __init magician_init(void)
adapter = i2c_get_adapter(0);
if (!adapter)
return -ENODEV;
- client = i2c_new_device(adapter, i2c_board_info);
+ client = i2c_new_client_device(adapter, i2c_board_info);
i2c_put_adapter(adapter);
- if (!client)
- return -ENODEV;
+ if (IS_ERR(client))
+ return PTR_ERR(client);
ret = gpio_request(EGPIO_MAGICIAN_SPK_POWER, "SPK_POWER");
if (ret)
--
2.20.1
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2020-03-26 21:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-26 21:10 [PATCH 0/1] ASoC: convert to use new I2C API Wolfram Sang
2020-03-26 21:10 ` Wolfram Sang [this message]
2020-03-27 15:33 ` Applied "ASoC: pxa: magician: convert to use i2c_new_client_device()" to the asoc tree Mark Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200326211010.13471-2-wsa+renesas@sang-engineering.com \
--to=wsa+renesas@sang-engineering.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=daniel@zonque.org \
--cc=haojian.zhuang@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robert.jarzmik@free.fr \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).