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: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20200326211010.13471-2-wsa+renesas@sang-engineering.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Wolfram Sang 2020-03-26 22:10:10 +01:00 committed by Mark Brown
parent b2fc1c08f7
commit 17fb543315
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0

View File

@ -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)