Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 303326
b: refs/heads/master
c: 39febc0
h: refs/heads/master
v: v3
  • Loading branch information
Shawn Guo committed May 12, 2012
1 parent 59f4151 commit 55f09e0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9c92cf2409d7828b797c763c661bffbf66d251c0
refs/heads/master: 39febc018bd26edb9f9f73c0f5ee661de37c7869
9 changes: 9 additions & 0 deletions trunk/drivers/mtd/nand/gpmi-nand/gpmi-nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include <linux/module.h>
#include <linux/mtd/gpmi-nand.h>
#include <linux/mtd/partitions.h>
#include <linux/pinctrl/consumer.h>
#include "gpmi-nand.h"

/* add our owner bbt descriptor */
Expand Down Expand Up @@ -476,6 +477,7 @@ static int __devinit acquire_dma_channels(struct gpmi_nand_data *this)
static int __devinit acquire_resources(struct gpmi_nand_data *this)
{
struct resources *res = &this->resources;
struct pinctrl *pinctrl;
int ret;

ret = acquire_register_block(this, GPMI_NAND_GPMI_REGS_ADDR_RES_NAME);
Expand All @@ -494,6 +496,12 @@ static int __devinit acquire_resources(struct gpmi_nand_data *this)
if (ret)
goto exit_dma_channels;

pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
if (IS_ERR(pinctrl)) {
ret = PTR_ERR(pinctrl);
goto exit_pin;
}

res->clock = clk_get(&this->pdev->dev, NULL);
if (IS_ERR(res->clock)) {
pr_err("can not get the clock\n");
Expand All @@ -503,6 +511,7 @@ static int __devinit acquire_resources(struct gpmi_nand_data *this)
return 0;

exit_clock:
exit_pin:
release_dma_channels(this);
exit_dma_channels:
release_bch_irq(this);
Expand Down

0 comments on commit 55f09e0

Please sign in to comment.