Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207759
b: refs/heads/master
c: 7b8516b
h: refs/heads/master
i:
  207757: da42284
  207755: 9ef7e02
  207751: a670b52
  207743: 2d510f4
v: v3
  • Loading branch information
Kulikov Vasiliy authored and David Woodhouse committed Aug 2, 2010
1 parent 026b35a commit 657388a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 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: 42845d2a49e574788823ae5e91c39e64c25cd872
refs/heads/master: 7b8516b780ec639f26a4c6cdb51e342d8feecd44
14 changes: 7 additions & 7 deletions trunk/drivers/mtd/nand/nandsim.c
Original file line number Diff line number Diff line change
Expand Up @@ -553,8 +553,8 @@ static uint64_t divide(uint64_t n, uint32_t d)
*/
static int init_nandsim(struct mtd_info *mtd)
{
struct nand_chip *chip = (struct nand_chip *)mtd->priv;
struct nandsim *ns = (struct nandsim *)(chip->priv);
struct nand_chip *chip = mtd->priv;
struct nandsim *ns = chip->priv;
int i, ret = 0;
uint64_t remains;
uint64_t next_offset;
Expand Down Expand Up @@ -1877,7 +1877,7 @@ static void switch_state(struct nandsim *ns)

static u_char ns_nand_read_byte(struct mtd_info *mtd)
{
struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;
u_char outb = 0x00;

/* Sanity and correctness checks */
Expand Down Expand Up @@ -1950,7 +1950,7 @@ static u_char ns_nand_read_byte(struct mtd_info *mtd)

static void ns_nand_write_byte(struct mtd_info *mtd, u_char byte)
{
struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;

/* Sanity and correctness checks */
if (!ns->lines.ce) {
Expand Down Expand Up @@ -2132,7 +2132,7 @@ static uint16_t ns_nand_read_word(struct mtd_info *mtd)

static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)
{
struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;

/* Check that chip is expecting data input */
if (!(ns->state & STATE_DATAIN_MASK)) {
Expand All @@ -2159,7 +2159,7 @@ static void ns_nand_write_buf(struct mtd_info *mtd, const u_char *buf, int len)

static void ns_nand_read_buf(struct mtd_info *mtd, u_char *buf, int len)
{
struct nandsim *ns = (struct nandsim *)((struct nand_chip *)mtd->priv)->priv;
struct nandsim *ns = ((struct nand_chip *)mtd->priv)->priv;

/* Sanity and correctness checks */
if (!ns->lines.ce) {
Expand Down Expand Up @@ -2352,7 +2352,7 @@ module_init(ns_init_module);
*/
static void __exit ns_cleanup_module(void)
{
struct nandsim *ns = (struct nandsim *)(((struct nand_chip *)nsmtd->priv)->priv);
struct nandsim *ns = ((struct nand_chip *)nsmtd->priv)->priv;
int i;

free_nandsim(ns); /* Free nandsim private resources */
Expand Down

0 comments on commit 657388a

Please sign in to comment.