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 <gregkh@suse.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committed by
Takashi Iwai

orang tua
091bf7624d
melakukan
ae31c1fbdb
@@ -1473,8 +1473,8 @@ static int wm8400_codec_probe(struct platform_device *dev)
|
||||
|
||||
codec = &priv->codec;
|
||||
codec->private_data = priv;
|
||||
codec->control_data = dev->dev.driver_data;
|
||||
priv->wm8400 = dev->dev.driver_data;
|
||||
codec->control_data = dev_get_drvdata(&dev->dev);
|
||||
priv->wm8400 = dev_get_drvdata(&dev->dev);
|
||||
|
||||
ret = regulator_bulk_get(priv->wm8400->dev,
|
||||
ARRAY_SIZE(power), &power[0]);
|
||||
|
Reference in New Issue
Block a user