* [PATCH 0/1] ALSA: ppc: convert to use new I2C API
@ 2020-03-26 21:10 Wolfram Sang
2020-03-26 21:10 ` Wolfram Sang
0 siblings, 1 reply; 6+ messages in thread
From: Wolfram Sang @ 2020-03-26 21:10 UTC (permalink / raw)
To: linux-i2c; +Cc: Wolfram Sang, alsa-devel, linux-kernel
We are deprecating calls which return NULL in favor of new variants which
return an ERR_PTR. Only build tested.
Wolfram Sang (1):
ALSA: ppc: keywest: convert to use i2c_new_client_device()
sound/ppc/keywest.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 1/1] ALSA: ppc: keywest: convert to use i2c_new_client_device()
2020-03-26 21:10 [PATCH 0/1] ALSA: ppc: convert to use new I2C API Wolfram Sang
@ 2020-03-26 21:10 ` Wolfram Sang
0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2020-03-26 21:10 UTC (permalink / raw)
To: linux-i2c
Cc: Wolfram Sang, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel
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/ppc/keywest.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sound/ppc/keywest.c b/sound/ppc/keywest.c
index 093806d735c6..9554a0c506af 100644
--- a/sound/ppc/keywest.c
+++ b/sound/ppc/keywest.c
@@ -40,6 +40,7 @@ static int keywest_probe(struct i2c_client *client,
static int keywest_attach_adapter(struct i2c_adapter *adapter)
{
struct i2c_board_info info;
+ struct i2c_client *client;
if (! keywest_ctx)
return -EINVAL;
@@ -50,9 +51,11 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "keywest", I2C_NAME_SIZE);
info.addr = keywest_ctx->addr;
- keywest_ctx->client = i2c_new_device(adapter, &info);
- if (!keywest_ctx->client)
- return -ENODEV;
+ client = i2c_new_client_device(adapter, &info);
+ if (IS_ERR(client))
+ return PTR_ERR(client);
+ keywest_ctx->client = client;
+
/*
* We know the driver is already loaded, so the device should be
* already bound. If not it means binding failed, and then there
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 1/1] ALSA: ppc: keywest: convert to use i2c_new_client_device()
@ 2020-03-26 21:10 ` Wolfram Sang
0 siblings, 0 replies; 6+ messages in thread
From: Wolfram Sang @ 2020-03-26 21:10 UTC (permalink / raw)
To: linux-i2c; +Cc: Wolfram Sang, alsa-devel, Takashi Iwai, linux-kernel
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/ppc/keywest.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/sound/ppc/keywest.c b/sound/ppc/keywest.c
index 093806d735c6..9554a0c506af 100644
--- a/sound/ppc/keywest.c
+++ b/sound/ppc/keywest.c
@@ -40,6 +40,7 @@ static int keywest_probe(struct i2c_client *client,
static int keywest_attach_adapter(struct i2c_adapter *adapter)
{
struct i2c_board_info info;
+ struct i2c_client *client;
if (! keywest_ctx)
return -EINVAL;
@@ -50,9 +51,11 @@ static int keywest_attach_adapter(struct i2c_adapter *adapter)
memset(&info, 0, sizeof(struct i2c_board_info));
strlcpy(info.type, "keywest", I2C_NAME_SIZE);
info.addr = keywest_ctx->addr;
- keywest_ctx->client = i2c_new_device(adapter, &info);
- if (!keywest_ctx->client)
- return -ENODEV;
+ client = i2c_new_client_device(adapter, &info);
+ if (IS_ERR(client))
+ return PTR_ERR(client);
+ keywest_ctx->client = client;
+
/*
* We know the driver is already loaded, so the device should be
* already bound. If not it means binding failed, and then there
--
2.20.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] ALSA: ppc: keywest: convert to use i2c_new_client_device()
2020-03-26 21:10 ` Wolfram Sang
(?)
@ 2020-03-27 8:33 ` Takashi Iwai
-1 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2020-03-27 8:33 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel
On Thu, 26 Mar 2020 22:10:12 +0100,
Wolfram Sang wrote:
>
> Move away from the deprecated API and return the shiny new ERRPTR where
> useful.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Applied, thanks.
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] ALSA: ppc: keywest: convert to use i2c_new_client_device()
@ 2020-03-27 8:33 ` Takashi Iwai
0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2020-03-27 8:33 UTC (permalink / raw)
To: Wolfram Sang
Cc: linux-i2c, Jaroslav Kysela, Takashi Iwai, alsa-devel, linux-kernel
On Thu, 26 Mar 2020 22:10:12 +0100,
Wolfram Sang wrote:
>
> Move away from the deprecated API and return the shiny new ERRPTR where
> useful.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Applied, thanks.
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/1] ALSA: ppc: keywest: convert to use i2c_new_client_device()
@ 2020-03-27 8:33 ` Takashi Iwai
0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2020-03-27 8:33 UTC (permalink / raw)
To: Wolfram Sang; +Cc: linux-kernel, alsa-devel, Takashi Iwai, linux-i2c
On Thu, 26 Mar 2020 22:10:12 +0100,
Wolfram Sang wrote:
>
> Move away from the deprecated API and return the shiny new ERRPTR where
> useful.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Applied, thanks.
Takashi
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-03-27 8:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 21:10 [PATCH 0/1] ALSA: ppc: convert to use new I2C API Wolfram Sang
2020-03-26 21:10 ` [PATCH 1/1] ALSA: ppc: keywest: convert to use i2c_new_client_device() Wolfram Sang
2020-03-26 21:10 ` Wolfram Sang
2020-03-27 8:33 ` Takashi Iwai
2020-03-27 8:33 ` Takashi Iwai
2020-03-27 8:33 ` Takashi Iwai
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.