diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-03-30 10:46:51 +0300 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-03-30 10:46:51 +0300 |
commit | aa21c3d4b941739651e77747d2f7a20a6c1d87bc (patch) | |
tree | ae46596c4fe5803fbd4746459a09a09cff5487e8 /sound/ppc/keywest.c | |
parent | 476c02e0b4fd9071d158f6a1a1dfea1d36ee0ffd (diff) | |
parent | 652bb5d8df4b3a79ed350db35cda12637e63efa7 (diff) | |
download | linux-aa21c3d4b941739651e77747d2f7a20a6c1d87bc.tar.xz |
Merge branch 'for-next' into for-linus
Diffstat (limited to 'sound/ppc/keywest.c')
-rw-r--r-- | sound/ppc/keywest.c | 9 |
1 files 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 |