diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2009-06-10 00:38:55 -0400 |
---|---|---|
committer | Benjamin Herrenschmidt <benh@kernel.crashing.org> | 2009-06-15 02:47:25 -0400 |
commit | 559dc87f50d062d881fed406efb76925aa1f30e7 (patch) | |
tree | ee1e0983f8a3c6bed62cd3b8fe8b7171d8a967e1 /drivers/char/ps3flash.c | |
parent | 03fa68c245cccbcb99035cbabaa13b408ba91ab5 (diff) |
ps3flash: Use ps3_system_bus_[gs]et_drvdata() instead of direct access
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/char/ps3flash.c')
-rw-r--r-- | drivers/char/ps3flash.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/char/ps3flash.c b/drivers/char/ps3flash.c index afbe45676d71..184e6ed2393d 100644 --- a/drivers/char/ps3flash.c +++ b/drivers/char/ps3flash.c | |||
@@ -108,7 +108,7 @@ static ssize_t ps3flash_read(struct file *file, char __user *buf, size_t count, | |||
108 | loff_t *pos) | 108 | loff_t *pos) |
109 | { | 109 | { |
110 | struct ps3_storage_device *dev = ps3flash_dev; | 110 | struct ps3_storage_device *dev = ps3flash_dev; |
111 | struct ps3flash_private *priv = dev->sbd.core.driver_data; | 111 | struct ps3flash_private *priv = ps3_system_bus_get_drvdata(&dev->sbd); |
112 | u64 size, start_sector, end_sector, offset; | 112 | u64 size, start_sector, end_sector, offset; |
113 | ssize_t sectors_read; | 113 | ssize_t sectors_read; |
114 | size_t remaining, n; | 114 | size_t remaining, n; |
@@ -173,7 +173,7 @@ static ssize_t ps3flash_write(struct file *file, const char __user *buf, | |||
173 | size_t count, loff_t *pos) | 173 | size_t count, loff_t *pos) |
174 | { | 174 | { |
175 | struct ps3_storage_device *dev = ps3flash_dev; | 175 | struct ps3_storage_device *dev = ps3flash_dev; |
176 | struct ps3flash_private *priv = dev->sbd.core.driver_data; | 176 | struct ps3flash_private *priv = ps3_system_bus_get_drvdata(&dev->sbd); |
177 | u64 size, chunk_sectors, start_write_sector, end_write_sector, | 177 | u64 size, chunk_sectors, start_write_sector, end_write_sector, |
178 | end_read_sector, start_read_sector, head, tail, offset; | 178 | end_read_sector, start_read_sector, head, tail, offset; |
179 | ssize_t res; | 179 | ssize_t res; |
@@ -366,7 +366,7 @@ static int __devinit ps3flash_probe(struct ps3_system_bus_device *_dev) | |||
366 | goto fail; | 366 | goto fail; |
367 | } | 367 | } |
368 | 368 | ||
369 | dev->sbd.core.driver_data = priv; | 369 | ps3_system_bus_set_drvdata(&dev->sbd, priv); |
370 | mutex_init(&priv->mutex); | 370 | mutex_init(&priv->mutex); |
371 | 371 | ||
372 | dev->bounce_size = ps3flash_bounce_buffer.size; | 372 | dev->bounce_size = ps3flash_bounce_buffer.size; |
@@ -392,7 +392,7 @@ fail_teardown: | |||
392 | ps3stor_teardown(dev); | 392 | ps3stor_teardown(dev); |
393 | fail_free_priv: | 393 | fail_free_priv: |
394 | kfree(priv); | 394 | kfree(priv); |
395 | dev->sbd.core.driver_data = NULL; | 395 | ps3_system_bus_set_drvdata(&dev->sbd, NULL); |
396 | fail: | 396 | fail: |
397 | ps3flash_dev = NULL; | 397 | ps3flash_dev = NULL; |
398 | return error; | 398 | return error; |
@@ -404,8 +404,8 @@ static int ps3flash_remove(struct ps3_system_bus_device *_dev) | |||
404 | 404 | ||
405 | misc_deregister(&ps3flash_misc); | 405 | misc_deregister(&ps3flash_misc); |
406 | ps3stor_teardown(dev); | 406 | ps3stor_teardown(dev); |
407 | kfree(dev->sbd.core.driver_data); | 407 | kfree(ps3_system_bus_get_drvdata(&dev->sbd)); |
408 | dev->sbd.core.driver_data = NULL; | 408 | ps3_system_bus_set_drvdata(&dev->sbd, NULL); |
409 | ps3flash_dev = NULL; | 409 | ps3flash_dev = NULL; |
410 | return 0; | 410 | return 0; |
411 | } | 411 | } |