Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 27881
b: refs/heads/master
c: 04bbd0e
h: refs/heads/master
i:
  27879: cc159b1
v: v3
  • Loading branch information
Thomas Gleixner authored and David Woodhouse committed May 25, 2006
1 parent 01b9618 commit 103e2d9
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8b9e9fe8c6ee354aa75dc5a33e1575b21aa52084
refs/heads/master: 04bbd0eafb0c733c6c7f5d63c5098c615fe0685a
7 changes: 4 additions & 3 deletions trunk/drivers/mtd/nand/nand_base.c
Original file line number Diff line number Diff line change
Expand Up @@ -2125,6 +2125,9 @@ static int nand_allocate_kmem(struct mtd_info *mtd, struct nand_chip *chip)
GFP_KERNEL);
if (!chip->controller)
goto outerr;

spin_lock_init(&chip->controller->lock);
init_waitqueue_head(&chip->controller->wq);
chip->options |= NAND_CONTROLLER_ALLOC;
}
return 0;
Expand Down Expand Up @@ -2451,10 +2454,8 @@ int nand_scan(struct mtd_info *mtd, int maxchips)
BUG();
}

/* Initialize state, waitqueue and spinlock */
/* Initialize state */
chip->state = FL_READY;
init_waitqueue_head(&chip->controller->wq);
spin_lock_init(&chip->controller->lock);

/* De-select the device */
chip->select_chip(mtd, -1);
Expand Down
6 changes: 5 additions & 1 deletion trunk/drivers/mtd/nand/ndfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,12 @@ static struct platform_driver ndfc_nand_driver = {

static int __init ndfc_nand_init(void)
{
int ret = platform_driver_register(&ndfc_nand_driver);
int ret;

spin_lock_init(&ndfc_ctrl.ndfc_control.lock);
init_waitqueue_head(&ndfc_ctrl.ndfc_control.wq);

ret = platform_driver_register(&ndfc_nand_driver);
if (!ret)
ret = platform_driver_register(&ndfc_chip_driver);
return ret;
Expand Down

0 comments on commit 103e2d9

Please sign in to comment.