wm8990.c (f9cd49033b349b8be3bb1f01b39eed837853d880) wm8990.c (587cbbb36ef2657cd888b7705e02cfe96ab088b7)
1/*
2 * wm8990.c -- WM8990 ALSA Soc Audio driver
3 *
4 * Copyright 2008 Wolfson Microelectronics PLC.
5 * Author: Liam Girdwood <lrg@slimlogic.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 1374 unchanged lines hidden (view full) ---

1383
1384#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
1385static __devinit int wm8990_i2c_probe(struct i2c_client *i2c,
1386 const struct i2c_device_id *id)
1387{
1388 struct wm8990_priv *wm8990;
1389 int ret;
1390
1/*
2 * wm8990.c -- WM8990 ALSA Soc Audio driver
3 *
4 * Copyright 2008 Wolfson Microelectronics PLC.
5 * Author: Liam Girdwood <lrg@slimlogic.co.uk>
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the

--- 1374 unchanged lines hidden (view full) ---

1383
1384#if defined(CONFIG_I2C) || defined(CONFIG_I2C_MODULE)
1385static __devinit int wm8990_i2c_probe(struct i2c_client *i2c,
1386 const struct i2c_device_id *id)
1387{
1388 struct wm8990_priv *wm8990;
1389 int ret;
1390
1391 wm8990 = kzalloc(sizeof(struct wm8990_priv), GFP_KERNEL);
1391 wm8990 = devm_kzalloc(&i2c->dev, sizeof(struct wm8990_priv),
1392 GFP_KERNEL);
1392 if (wm8990 == NULL)
1393 return -ENOMEM;
1394
1395 i2c_set_clientdata(i2c, wm8990);
1396
1397 ret = snd_soc_register_codec(&i2c->dev,
1398 &soc_codec_dev_wm8990, &wm8990_dai, 1);
1393 if (wm8990 == NULL)
1394 return -ENOMEM;
1395
1396 i2c_set_clientdata(i2c, wm8990);
1397
1398 ret = snd_soc_register_codec(&i2c->dev,
1399 &soc_codec_dev_wm8990, &wm8990_dai, 1);
1399 if (ret < 0)
1400 kfree(wm8990);
1400
1401 return ret;
1402}
1403
1404static __devexit int wm8990_i2c_remove(struct i2c_client *client)
1405{
1406 snd_soc_unregister_codec(&client->dev);
1401 return ret;
1402}
1403
1404static __devexit int wm8990_i2c_remove(struct i2c_client *client)
1405{
1406 snd_soc_unregister_codec(&client->dev);
1407 kfree(i2c_get_clientdata(client));
1407
1408 return 0;
1409}
1410
1411static const struct i2c_device_id wm8990_i2c_id[] = {
1412 { "wm8990", 0 },
1413 { }
1414};
1415MODULE_DEVICE_TABLE(i2c, wm8990_i2c_id);

--- 37 unchanged lines hidden ---
1408 return 0;
1409}
1410
1411static const struct i2c_device_id wm8990_i2c_id[] = {
1412 { "wm8990", 0 },
1413 { }
1414};
1415MODULE_DEVICE_TABLE(i2c, wm8990_i2c_id);

--- 37 unchanged lines hidden ---