diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-05-04 15:40:54 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-05-12 03:20:54 -0400 |
commit | ae31c1fbdbb18d917b0a1139497c2dbd35886989 (patch) | |
tree | cdc2e881e4195858a72a88627b28461900477757 /sound/aoa/soundbus | |
parent | 091bf7624d1c90cec9e578a18529f615213ff847 (diff) |
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>
Diffstat (limited to 'sound/aoa/soundbus')
-rw-r--r-- | sound/aoa/soundbus/i2sbus/core.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/aoa/soundbus/i2sbus/core.c b/sound/aoa/soundbus/i2sbus/core.c index 418c84c99d69..4e3b819d4993 100644 --- a/sound/aoa/soundbus/i2sbus/core.c +++ b/sound/aoa/soundbus/i2sbus/core.c | |||
@@ -358,14 +358,14 @@ static int i2sbus_probe(struct macio_dev* dev, const struct of_device_id *match) | |||
358 | return -ENODEV; | 358 | return -ENODEV; |
359 | } | 359 | } |
360 | 360 | ||
361 | dev->ofdev.dev.driver_data = control; | 361 | dev_set_drvdata(&dev->ofdev.dev, control); |
362 | 362 | ||
363 | return 0; | 363 | return 0; |
364 | } | 364 | } |
365 | 365 | ||
366 | static int i2sbus_remove(struct macio_dev* dev) | 366 | static int i2sbus_remove(struct macio_dev* dev) |
367 | { | 367 | { |
368 | struct i2sbus_control *control = dev->ofdev.dev.driver_data; | 368 | struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev); |
369 | struct i2sbus_dev *i2sdev, *tmp; | 369 | struct i2sbus_dev *i2sdev, *tmp; |
370 | 370 | ||
371 | list_for_each_entry_safe(i2sdev, tmp, &control->list, item) | 371 | list_for_each_entry_safe(i2sdev, tmp, &control->list, item) |
@@ -377,7 +377,7 @@ static int i2sbus_remove(struct macio_dev* dev) | |||
377 | #ifdef CONFIG_PM | 377 | #ifdef CONFIG_PM |
378 | static int i2sbus_suspend(struct macio_dev* dev, pm_message_t state) | 378 | static int i2sbus_suspend(struct macio_dev* dev, pm_message_t state) |
379 | { | 379 | { |
380 | struct i2sbus_control *control = dev->ofdev.dev.driver_data; | 380 | struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev); |
381 | struct codec_info_item *cii; | 381 | struct codec_info_item *cii; |
382 | struct i2sbus_dev* i2sdev; | 382 | struct i2sbus_dev* i2sdev; |
383 | int err, ret = 0; | 383 | int err, ret = 0; |
@@ -407,7 +407,7 @@ static int i2sbus_suspend(struct macio_dev* dev, pm_message_t state) | |||
407 | 407 | ||
408 | static int i2sbus_resume(struct macio_dev* dev) | 408 | static int i2sbus_resume(struct macio_dev* dev) |
409 | { | 409 | { |
410 | struct i2sbus_control *control = dev->ofdev.dev.driver_data; | 410 | struct i2sbus_control *control = dev_get_drvdata(&dev->ofdev.dev); |
411 | struct codec_info_item *cii; | 411 | struct codec_info_item *cii; |
412 | struct i2sbus_dev* i2sdev; | 412 | struct i2sbus_dev* i2sdev; |
413 | int err, ret = 0; | 413 | int err, ret = 0; |