Commit 17fb5433 authored by Wolfram Sang's avatar Wolfram Sang Committed by Mark Brown

ASoC: pxa: magician: convert to use i2c_new_client_device()

Move away from the deprecated API and return the shiny new ERRPTR where
useful.
Signed-off-by: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20200326211010.13471-2-wsa+renesas@sang-engineering.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent b2fc1c08
...@@ -358,10 +358,10 @@ static int __init magician_init(void) ...@@ -358,10 +358,10 @@ static int __init magician_init(void)
adapter = i2c_get_adapter(0); adapter = i2c_get_adapter(0);
if (!adapter) if (!adapter)
return -ENODEV; return -ENODEV;
client = i2c_new_device(adapter, i2c_board_info); client = i2c_new_client_device(adapter, i2c_board_info);
i2c_put_adapter(adapter); i2c_put_adapter(adapter);
if (!client) if (IS_ERR(client))
return -ENODEV; return PTR_ERR(client);
ret = gpio_request(EGPIO_MAGICIAN_SPK_POWER, "SPK_POWER"); ret = gpio_request(EGPIO_MAGICIAN_SPK_POWER, "SPK_POWER");
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment