aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/ps3vram.c
diff options
context:
space:
mode:
authorGeert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>2009-06-10 00:38:38 -0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-06-14 23:26:18 -0400
commit3c20e2f2793380add92dacce63395a8503b6c7c9 (patch)
tree6e4c10bf5162b0c9a479bc3180dc2cd59040409a /drivers/block/ps3vram.c
parent734957c89794971c874f9d3ccd9eb49dc3325f65 (diff)
ps3vram: Use proc_create_data() instead of proc_create()
Use proc_create_data() to avoid race conditions. Reported-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> Cc: Jim Paris <jim@jtan.com> Cc: Jens Axboe <axboe@kernel.dk> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/block/ps3vram.c')
-rw-r--r--drivers/block/ps3vram.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/block/ps3vram.c b/drivers/block/ps3vram.c
index 2e79d2cfa023..6e738684a158 100644
--- a/drivers/block/ps3vram.c
+++ b/drivers/block/ps3vram.c
@@ -546,12 +546,10 @@ static void __devinit ps3vram_proc_init(struct ps3_system_bus_device *dev)
546 struct ps3vram_priv *priv = dev->core.driver_data; 546 struct ps3vram_priv *priv = dev->core.driver_data;
547 struct proc_dir_entry *pde; 547 struct proc_dir_entry *pde;
548 548
549 pde = proc_create(DEVICE_NAME, 0444, NULL, &ps3vram_proc_fops); 549 pde = proc_create_data(DEVICE_NAME, 0444, NULL, &ps3vram_proc_fops,
550 if (!pde) { 550 priv);
551 if (!pde)
551 dev_warn(&dev->core, "failed to create /proc entry\n"); 552 dev_warn(&dev->core, "failed to create /proc entry\n");
552 return;
553 }
554 pde->data = priv;
555} 553}
556 554
557static int ps3vram_make_request(struct request_queue *q, struct bio *bio) 555static int ps3vram_make_request(struct request_queue *q, struct bio *bio)