mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 19:51:31 -04:00
sound: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access to the driver_data pointer in struct device. Instead, the functions dev_get_drvdata() and dev_set_drvdata() should be used. These functions have been around since the beginning, so are backwards compatible with all older kernel versions. Signed-off-by: Greg Kroah-Hartman <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
parent
091bf7624d
commit
ae31c1fbdb
5 changed files with 14 additions and 14 deletions
|
|
@ -1037,7 +1037,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
|
|||
}
|
||||
ldev->selfptr_headphone.ptr = ldev;
|
||||
ldev->selfptr_lineout.ptr = ldev;
|
||||
sdev->ofdev.dev.driver_data = ldev;
|
||||
dev_set_drvdata(&sdev->ofdev.dev, ldev);
|
||||
list_add(&ldev->list, &layouts_list);
|
||||
layouts_list_items++;
|
||||
|
||||
|
|
@ -1081,7 +1081,7 @@ static int aoa_fabric_layout_probe(struct soundbus_dev *sdev)
|
|||
|
||||
static int aoa_fabric_layout_remove(struct soundbus_dev *sdev)
|
||||
{
|
||||
struct layout_dev *ldev = sdev->ofdev.dev.driver_data;
|
||||
struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
|
||||
int i;
|
||||
|
||||
for (i=0; i<MAX_CODECS_PER_BUS; i++) {
|
||||
|
|
@ -1114,7 +1114,7 @@ static int aoa_fabric_layout_remove(struct soundbus_dev *sdev)
|
|||
#ifdef CONFIG_PM
|
||||
static int aoa_fabric_layout_suspend(struct soundbus_dev *sdev, pm_message_t state)
|
||||
{
|
||||
struct layout_dev *ldev = sdev->ofdev.dev.driver_data;
|
||||
struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
|
||||
|
||||
if (ldev->gpio.methods && ldev->gpio.methods->all_amps_off)
|
||||
ldev->gpio.methods->all_amps_off(&ldev->gpio);
|
||||
|
|
@ -1124,7 +1124,7 @@ static int aoa_fabric_layout_suspend(struct soundbus_dev *sdev, pm_message_t sta
|
|||
|
||||
static int aoa_fabric_layout_resume(struct soundbus_dev *sdev)
|
||||
{
|
||||
struct layout_dev *ldev = sdev->ofdev.dev.driver_data;
|
||||
struct layout_dev *ldev = dev_get_drvdata(&sdev->ofdev.dev);
|
||||
|
||||
if (ldev->gpio.methods && ldev->gpio.methods->all_amps_off)
|
||||
ldev->gpio.methods->all_amps_restore(&ldev->gpio);
|
||||
|
|
|
|||
|
|
@ -358,14 +358,14 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
dev->ofdev.dev.driver_data = control;
|
||||
dev_set_drvdata(&dev->ofdev.dev, control);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int i2sbus_remove(struct macio_dev* dev)
|
||||
{
|
||||
struct i2sbus_control *control = dev->ofdev.dev.driver_data;
|
||||
struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev);
|
||||
struct i2sbus_dev *i2sdev, *tmp;
|
||||
|
||||
list_for_each_entry_safe(i2sdev, tmp, &control->list, item)
|
||||
|
|
@ -377,7 +377,7 @@ static int i2sbus_remove(struct macio_dev* dev)
|
|||
#ifdef CONFIG_PM
|
||||
static int i2sbus_suspend(struct macio_dev* dev, pm_message_t state)
|
||||
{
|
||||
struct i2sbus_control *control = dev->ofdev.dev.driver_data;
|
||||
struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev);
|
||||
struct codec_info_item *cii;
|
||||
struct i2sbus_dev* i2sdev;
|
||||
int err, ret = 0;
|
||||
|
|
@ -407,7 +407,7 @@ static int i2sbus_suspend(struct macio_dev* dev, pm_message_t state)
|
|||
|
||||
static int i2sbus_resume(struct macio_dev* dev)
|
||||
{
|
||||
struct i2sbus_control *control = dev->ofdev.dev.driver_data;
|
||||
struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev);
|
||||
struct codec_info_item *cii;
|
||||
struct i2sbus_dev* i2sdev;
|
||||
int err, ret = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue